Just a quick question
I’m using preg_replace at the min to replace certain words with links. i only want the first instance of that word to be replaced with a link and found that pre_replace can do this for me with the limit. This works great.
Now i have also heard that str_replace is faster.
Can you do the same thing with str_replace and limit the changes to one per item or can i keep on happily using preg_replace like i am.
Just a thought.
Cheers