Forum Moderators: coopster
so i'm storing the page contents into a buffer, and then using str_ireplace, like this...
$b = str_ireplace('blah','<a href="example.html">blah</a>', $b); this works great... but it looks a little ugly when there are numerous instances of the word 'blah' on the page. i sometimes end up with as many as ten links all pointing to the same place.
so i was wondering if there was a way to stop str_ireplace after the first link has been changed.
i should mention that i've got actually got loads of words to change... blah2, blah3, blah4... etc etc. so i only need it to stop after it's done blah1, and then move onto blah2, blah3 etc.
i probably explained all that in a very confusing way... hope you can get the gist!