RE: [PHP] regexp problem
| From: | BCS) | Date: | Mon, 18 Dec 2000 06:06:30 +0000 |
| Subject: | RE: [PHP] regexp problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30834@lists.php.net to get a copy of this message | ||
> If all you want to do is replace a word with another use
> str_replace() - it's quite a bit faster and just the same thing.
>
> $new_string = str_replace('the','foo',$old_string);
Sure it's faster, but do you really want your 'thesaurus' being transformed into
'foosaurus? I don't.
./peter