Re: preg_replace() ??
| From: | Erik Price | Date: | Fri, 01 Mar 2002 15:34:09 +0000 |
| Subject: | Re: preg_replace() ?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86772@lists.php.net to get a copy of this message | ||
On Thursday, February 28, 2002, at 10:33 PM, Monty wrote:
Is preg_replace() the best PHP command to use for parsing custom codes in text retrieved from a database (e.g., turning "[link= ]" into "<a href= >")?Use preg only if you need the power of regexes. If you are just looking to replace certain predefined strings with other strings, then you should use substr() it's faster. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com