I have text file and i want to show page number for displaying in page
for example my text file have 100 lines , i can show them with array in table , every line in one row like below :
this is my text file example:
mycontent-54564-yoursdsd
condsadtent-5544564-fyfdfdsd
....
//convert into array
$lines = file('myfile.txt');
//count number of lines
$numbers=count($lines);
//show every line in a row of table :
foreach ($lines as $line) {
$line=explode("-", $line);
echo "<tr>";
echo "<td>$line[0]</td>";
echo "<td>$line[1]</td>";
echo "<td>$line[2]</td>";
echo "</tr>";
}
I want to have pagination with PHP for viewing this table , for example show every 10 line of text file in one page , line 1 to 10 in page 1 , line 11 to 20 in page 2 and etc ... how can i do this?
thanks