On Friday, March 1, 2002, at 10:34  AM, Erik Price wrote:

>
> 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.
>


Whoops, I meant str_replace()  !



----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to