note 45034 added to function.preg-replace-callback

From: Date: Tue, 24 Aug 2004 02:05:47 +0000
Subject: note 45034 added to function.preg-replace-callback
Groups: php.notes 
Request: Send a blank email to php-notes+get-75190@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45034 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45034&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45034&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75190) next »