Jump to content

[SOLVED] split a text doc


the-botman

Recommended Posts

something along these lines

<?php
$page =(empty($_GET['page']))1:$_GET['page']; //get page
$page = $page * 10; //
$lines = file('thefile.txt');
for($n=($page-10)$n<$page;$n++){
    echo lines[$n]."<br />\n";
}
echo "<a href=\"page=".$page-1."\">previous</a> | <a href=\"page=".$page+1."\">next</a>";

 

untested but you should get the idea

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.