note 71724 deleted from function.str-replace by philip
| From: | philip@php.net | Date: | Mon, 26 Feb 2007 07:03:27 +0000 |
| Subject: | note 71724 deleted from function.str-replace by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123885@lists.php.net to get a copy of this message | ||
Note Submitter: Faroul
----
use ' (single quotes) to avoid parsing of the string;
so
<?php
$content = 'This is $12.95';
echo preg_replace("/%cont%/", $content, $html);
?>
would work fine (although preg_replace() in this place is quite overused :)