More about PHP substr() function >>>
You know* substr()*
function in php. The normal usage of this function is here:
Sytax: substr($str, $start, $length);
* echo substr(‘hello
world’,7,3); ?>
* // First parameter is the string, second is
the start index (first character of the string starts from 0) and third param
is the length of the substring
Output: orl .
If we not specified the length parameter (parameter 3),
returns the string from $start to the end of the string.
output: **he way to operating thea
another eg:
echo substr(‘on the way to operating theatre’, -9,-3)?>
output: g thea
Thanks and Regards
Syth