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.
August 20, 2008
preg_replace, my new best friend
Subscribe to:
Post Comments (Atom)

1 comment:
Great!!!
Phelps, congratulations!!!
"08-08-08" Olympc Games!!!
Post a Comment