note 45034 deleted from function.preg-replace-callback by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 18:44:41 +0000 |
| Subject: | note 45034 deleted from function.preg-replace-callback by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127652@lists.php.net to get a copy of this message | ||
Note Submitter:
----
There is a small typo with the code (at least when I try to implement it) in the first comment.
<?php
echo preg_replace("/(<\/?)(\w+)([^>]*>)/e", "html_body('\\1',
'\\2', '\\3', '$extra_info')", $html_body);
?>
should really be
<?php
echo preg_replace("/(<\/?)(\w+)([^>]*>)/e", html_body('\\1',
'\\2', '\\3', '$extra_info'), $html_body);
?>
That is, the second argument should not have quotes around it. This should apply to all of the
other examples in the comments as well.