Now, usually the obvious choice is str_replace, but I'm dealing with an array of maybe 40 - 50 elements here out of which only a couple will actually be in the text I'm replacing them in. What is more efficient? Looping through a bunch of times, even if many are unsuccessful or using regular expressions? thanks
str_replace, with almost 100% certainty. Would have to be very odd for regular expressions to be faster.
alright, thanks for the input. I thought so. I guess I'll castrate the array before passing it to the loop as well.