Re: Bug #12477 Updated: preg_replace evaluates dollar signs as variables (eg $1,000 becomes ,000)
| From: | Andrei Zmievski | Date: | Tue, 07 Aug 2001 13:08:17 +0000 |
| Subject: | Re: Bug #12477 Updated: preg_replace evaluates dollar signs as variables (eg $1,000 becomes ,000) | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62406@lists.php.net to get a copy of this message | ||
On Mon, 06 Aug 2001, Grant.Walters@walters.co.nz wrote:
> ID: 12477
> User updated by: Grant.Walters@walters.co.nz
> Reported By: Grant.Walters@walters.co.nz
> Status: Closed
> Bug Type: Feature/Change Request
> Operating System: Linux and SCO
> PHP Version: 4.0.6
> New Comment:
>
> I was trying to have to walk the array twice.
>
> The following works:
>
> $pagevars = str_replace("$","\\\$",$pagevars);
> $page = preg_replace($template,$pagevars,$page);
>
> The reason for using preg_replace is that it does a recursive? replace.
What do you mean, 'recursive' replace?
-Andrei
* I don't mind going nowhere as long as it's an interesting path. *