Mega Code Archive

 
Categories / Php / Code Snippets
 

Display html source with line numbers

<?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"; } ?>