note 28096 deleted from function.highlight-string by sniper

From: Date: Thu, 02 Oct 2003 14:25:31 +0000
Subject: note 28096 deleted from function.highlight-string by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57615@lists.php.net to get a copy of this message
Note Submitter: Marc <myscripts@lycos.nl> ---- 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.

« previous php.notes (#57615) next »