Is it possible to tell which string or strings are replaced when using PHP's str_replace
function?
In other words, I have a call similar to the following
$subject = str_replace($search, $replace, $subject, $count);
Where $search
and $replace
are both arrays. If $count > 0
I want to figure out which strings were replaced and do something with them. Is something like this possible? Is there a function which does it? Should I just rewrite my code?