This is a little chunk of code that i use to show the source of a file, i took part of the idea from a example i found on another php function page.
This code takes a php file and highlights it and places a line number next to it. Great for on the fly debugging.
<?php
$lines = file('index.php');
echo('<table border=0 cellpadding=0 cellspacing=0>');
foreach ($lines as $line_num => $line) {
echo('<tr>');
echo('<td bgcolor = "#cccccc">');
echo('<code>' . ($line_num + 1) . '</code>');
echo('</td>');
echo('<td>');
highlight_string($line);
echo('</td>');
echo('</tr>');
}
?>