note 58312 deleted from function.preg-replace-callback by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 18:45:26 +0000 |
| Subject: | note 58312 deleted from function.preg-replace-callback by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127656@lists.php.net to get a copy of this message | ||
Note Submitter: user at lesplumesdusavoir dot net
----
You can use this method instead of preg_replace_callback :
<?php
echo preg_replace("
(<\/?)(\w+)([^>]*>)e", // Don't forget e
"html_body('\\1', '\\2', '\\3', \$extra_info)", $html_body);
// To pass other params..., Don't '$extra_info' but \$extra_info.
?>
It works very well. Enjoy :)