multiple replaces...
| From: | Lauri Vain | Date: | Sat, 12 Jan 2002 11:44:49 +0000 |
| Subject: | multiple replaces... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80281@lists.php.net to get a copy of this message | ||
Hello there,
I have about 30 markers in the text which need to be replaced with the value of a variable or an
array.
Common sense comes up with
eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("blah","ho-ho-ho",text)));
The list above could go on and on... I'm sure there are better ways to replace many markers or
spans of text with something else. A loop? Something even more easier and better?
Thanks,
Lauri
--
Tharapita Creations
[dynamic web applications]
lauri.vain@tharapita.com
Mobile: +372 53 410 610