note 17264 deleted from function.preg-replace by sniper
| From: | sniper@php.net | Date: | Sun, 07 Sep 2003 21:58:19 +0000 |
| Subject: | note 17264 deleted from function.preg-replace by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55674@lists.php.net to get a copy of this message | ||
Note Submitter: tarjei@Spbot.bom
----
FUNCTIONS IN PREG:
On using functions in the preg_ funtion. For me,
this did not work:
preg_replace($pattern,"thfunction($0,$4)",$string);
but this worked:
preg_replace($pattern,"thfunction(\"$0\",\"$4\")",$string);
<p>Note the \" before and after each $var in the functioncall.