note 34352 added to function.highlight-string
| From: | glox at glox dot be | Date: | Thu, 24 Jul 2003 15:10:30 +0000 |
| Subject: | note 34352 added to function.highlight-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52575@lists.php.net to get a copy of this message | ||
I see alot of people using output buffering to get the highlightef source in a variable...
The highlight_string() function has an extra parameter for this:
$code = '<? echo "foo"; ?>';
$code = highlight_string($code,1);
this will highlight the code in $code and return it to the variable $code and not printing it on the
screen !
----
Manual Page -- http://www.php.net/manual/en/function.highlight-string.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34352
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34352&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34352&report=yes