/ Published in: PHP
Want to be able to display the source code of any webpage, with line numbering? Here is a simple code snippet to do it. Just modify the url on line 2 at your convenience. Or even better, make a pretty function according to your needs.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// display source code foreach ($lines as $line_num => $line) { // loop thru each line and prepend line numbers }
URL: http://perishablepress.com/code-snippets/#code-snippets_php