Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get word between two characters php

  function get_string_between($string, $start, $end){
    $string = ' ' . $string;
    $ini = strpos($string, $start);
    if ($ini == 0) return '';
    $ini += strlen($start);
    $len = strpos($string, $end, $ini) - $ini;
    return substr($string, $ini, $len);
}
 
PREVIOUS NEXT
Tagged: #word #characters #php
ADD COMMENT
Topic
Name
3+5 =