note 37451 deleted from function.highlight-string by aidan
| From: | aidan@php.net | Date: | Sun, 26 Sep 2004 13:46:28 +0000 |
| Subject: | note 37451 deleted from function.highlight-string by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77364@lists.php.net to get a copy of this message | ||
Note Submitter: mirabal at adinet com uy
----
An enhanced version of the custom highlight function:
function source_highlight($string, $line=0){
$linecount = substr_count($string, "\n") + 1;
$string = highlight_string($string, true);
$ret = '<table bgcolor="#BBDD83" cellspacing="0"
width="100%" border="0" cellpadding="2"><tr
valign="top"><td bgcolor="#7C9B6D" width="0"
align="right"><code>';
for($i=1; $i<=$linecount; $i++) $ret .= "$i\n";
$ret .= '</code></td><td nowrap>' . $string .
'</td></tr></table>';
return $ret;
}