Line #0 : <?php
Line #1 :
Line #2 : /**
Line #3 : * Reads the contents of a text file (this script) into an array
Line #4 : * then echos the array line by line to the screen
Line #5 : *
Line #6 : *
Line #7 : */
Line #8 :
Line #9 :
Line #10 : // Print out what I found.
Line #11 :
Line #12 : $lines = file('text_file_printer.php');
Line #13 :
Line #14 : // Loop through our array, show HTML source as HTML source; and line numbers too.
Line #15 : foreach ($lines as $line_num => $line) {
Line #16 : echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n";
Line #17 : }
Line #18 :
Line #19 : ?>