note 37451 added to function.highlight-string

From: Date: Sat, 15 Nov 2003 19:51:24 +0000
Subject: note 37451 added to function.highlight-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-60429@lists.php.net to get a copy of this message
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; } ---- Manual Page -- http://www.php.net/manual/en/function.highlight-string.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37451 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37451&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37451&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60429) next »