| string replacement.... "lets say i have a string like this"
i want replace "have" and "string" with something like
"<a href="foo">have</a>"
"<a href="bar">string</a>"
i want to do this on a medium scale site without slowing everything down too much.
i was thinking of reading the string into an array and then compairing each element against another array that held the replacements. however, i think that will slow everything down.
anyone have any ideas of how to implement somethign like this without too much overhead? |