PHP: substr

substr(string $string, int $start [,int $length])

– $start is zero-based
– $length, for example if string is We only have…, it should print as ly have…. It begins on the 5th index.

===

strpos

– returns true

$mystring = ‘abc’;
$findme = ‘a’;
$pos = strpos($mystring, $findme);

===

$phrase = "Your love is like a river that flows...";
$string = 'love';
$len = strlen($string);

$pos = strpos($phrase, $string);

$show = substr($phrase, $pos, $len);

echo $show;