note 41761 added to function.preg-replace

From: Date: Wed, 21 Apr 2004 19:24:44 +0000
Subject: note 41761 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-68473@lists.php.net to get a copy of this message
How to ? $Text=preg_replace("/\[source_code\](.+?)\[\/source_code\]/is", "<blockquote><table><i> Source Code:</i><tr><td>\\1</td></tr></table></blockquote>", $Text); I want the content \\1 to be parse to highlight ... but i can' get it work ... as highlight_string($code, true); $Text=preg_replace("/\[source_code\](.+?)\[\/source_code\]/is", "<blockquote><table><i> Source Code:</i><tr><td>".highlight_string("\\1")." </td></tr></table></blockquote>", $Text); how to get matching array into variable and pass it to second function ? ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41761 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41761&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41761&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68473) next »