how to get first five characters from string using php.
here is my string that ,
$str = 'easyscript4u.blogspot.in';
and i want to "easys" from a string than write like this,
output :
easys
here is my string that ,
$str = 'easyscript4u.blogspot.in';
and i want to "easys" from a string than write like this,
$res = substr($str, 0, 5);
echo $res;output :
easys
0 comments:
Post a Comment