What happens when multiple instances of the search string overlap? : String Replace : String PHP Source Code


PHP Source Code » String » String Replace »

 

What happens when multiple instances of the search string overlap?




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

?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo String
» String Replace