note 28096 added to function.highlight-string

From: Date: Thu, 02 Jan 2003 01:59:04 +0000
Subject: note 28096 added to function.highlight-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-41565@lists.php.net to get a copy of this message
Here is a script with line numbers. I know there is allready is one, but this one is different. Just Check It Out ! <?php function Highlight($text) { $tekst = stripslashes($text); $gesplit = split("\n", $tekst); $grote = count($gesplit); echo "<table bgcolor=#ffffff bordercolor=black cellspacing=0 width=100% style='border: 1px solid black'"; for($i = 0; $i < $grote; $i++) { $t = $i + 1; $tekst = highlight_string($tekst, true); echo "<tr><td bgcolor=#CCCCCC width=14><div align=right><font face=verdana size=1>".$t."</font></div></td>"; if($t < 2) { echo "<td style='padding-left: 5px' rowspan='10000' valign='top'>".$tekst."</td>"; } echo "</tr>"; } } $string = "<? phpinfo(); include('test.php'); echo 'Just Testing !'; ?>"; Highlight($string); ?> I hope you like it and jou can us it. -- http://www.php.net/manual/en/function.highlight-string.php http://master.php.net/manage/user-notes.php?action=edit+28096 http://master.php.net/manage/user-notes.php?action=delete+28096 http://master.php.net/manage/user-notes.php?action=reject+28096

« previous php.notes (#41565) next »