If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.
Post a reply to the thread: PHP find and replace. Please help?
Click here to log in
What color is our footer?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.
PHP find and replace. Please help? <?php // The text string $text = "The quick brown fox jumped over the lazy dog."; // The word we want to replace $oldWord = "brown"; // The new word we want in place of the old one $newWord = "blue"; // Run through the text and replaces all occurrences of $oldText $text = str_replace($oldWord , $newWord , $text); // Display the new text echo $text; ?> The current code will only replace one word. I need a code that will replace multiple word. Please help.
PHP find and replace. Please help?
Forum Rules