August 20, 2008

preg_replace, my new best friend

Sometimes regular rexpressions aren't the right tool when you are trying to edit a string. When you want to do a bunch of find/replace that are not related, preg_replace is the right tool. You give it a matrix of the strings you are looking for, another matrix of the strings you want to change them to, and the string.

1 comment:

david santos said...

Great!!!


Phelps, congratulations!!!
"08-08-08" Olympc Games!!!