note 4554 deleted from preg_replace by ronabop
| From: | ronabop@php.net | Date: | Thu, 17 Aug 2000 09:43:43 +0000 |
| Subject: | note 4554 deleted from preg_replace by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2137@lists.php.net to get a copy of this message | ||
Am I crazy?
$string = "<table><tr><td>
<!-- BEGIN relatedlinks -->
<!-- END relatedlinks -->
</td></tr><tr><td>";
$reg = "/<!-- BEGIN ". $handle ." -->(.*)<!-- END ". $handle ."
-->/sm";
preg_replace($reg, '{'. $name .'}', $string);
The above works, the below doesn't. Any ideas?
preg_replace($reg, "{$name}", $string); // Leaves off the { and }.