Snippet Name: Display html source with line numbers
Description: Great way to show the html source of a page complete with line numbers.
Comment: (none)
Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009
|
<?PHP
// Get the HTML source of google
$count = FILE ('http://www.google.com/');
// Loop through our array
FOREACH ($count AS $line_num => $line)
{
ECHO "Line #{$line_num} : " . HTMLSPECIALCHARS($line) . "<br>\n";
}
?> |