/ Published in: PHP
A script I used for quickly load a file (see line 3) and then make a table which had linenumbers on each line. You may want to add a +1 when its generating the table...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $table = "<table>\n"; foreach($file_splited as $itemname => $item) { $table .= "<tr> <td> " . $itemname . " </td> <td> " . $item . " </td> </tr>\n"; } $table .= "</table>\n\n"; echo $table; ?>