PHP What Happens When Multiple Instances Of Search String Overlap? – String Function

 
    <?
$tricky_string = "ABA is part of ABABA";
$maybe_tricked = str_replace("ABA", "DEF", $tricky_string);
print("Substitution result is '$maybe_tricked'<br />");?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.