[ad_1]
Please try this:
<?
$str="The Hunger Games";
if (strtolower(substr($str,0,3)) == "the"){
$str = trim(substr($str,3)).', The';
}
echo $str;
?>
3
[ad_2]
solved Replace first word of sentence to the end if it is “the” [closed]
[ad_1]
Please try this:
<?
$str="The Hunger Games";
if (strtolower(substr($str,0,3)) == "the"){
$str = trim(substr($str,3)).', The';
}
echo $str;
?>
3
[ad_2]
solved Replace first word of sentence to the end if it is “the” [closed]