I must import file (example of this file in attachment) from .txt file to table in html (with 5 columns) to PHP document. I want to except the first column, whic added now to my table (Lp. and numbers from 1 ... xx) and the first line (it's the headers of column but not in my table - it's column in txt file and I don't want to import this).
Now my code is:
<?php
$file = fopen("test.txt","r");
if(count >= 30);
while(! feof($file))
{
echo "<tr>";
$line = fgets($file);
$cols = explode('|', trim($line, '|'));
$deleted_item = array_pop($cols);
foreach($cols as $col)
echo "<td>$col</td>";
echo "</tr>";
}
fclose($file);
?>
I need read and import data for example from 10 to 50 line from .txt file.
Example of file on Pastebin: pastebin.com/4045z1us
Image with what I want to have :)
Thanks for help.