note 41761 rejected from function.preg-replace by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 21 Apr 2004 19:35:25 +0000 |
| Subject: | note 41761 rejected from function.preg-replace by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68474@lists.php.net to get a copy of this message | ||
Note Submitter: feha@vision.to
----
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 ?