RE: [PHP] preg_replace update
| From: | daniel | Date: | Fri, 11 Apr 2003 01:47:07 +0000 |
| Subject: | RE: [PHP] preg_replace update | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-143425@lists.php.net to get a copy of this message | ||
seems to work thanks heaps
>===== Original Message From <holmes072000@charter.net> =====
>> ok guys sorry i've prob asked this question too many times, i'm trying
>to
>> replace the eregi_replace with preg_replace but my syntax is wrong
>>
>> $replaced_content =
>> preg_replace("/\[f$key\f\]/i",$value,$replaced_content);
>>
>> this doesnt seem to work where
>> this does
>>
>> $replaced = eregi_replace("\[f$key\f\]","$value",$replaced);
>
>Try "/\[f".$key."f\]/i" for your pattern.
>
>---John W. Holmes...
>
>PHP Architect - A monthly magazine for PHP Professionals. Get your copy
>today. http://www.phparch.com/