0

i really can figure out how pagination works..
suppose i have 2 files ok.php and pagin.ph
ok.php containts some details.

<?php
echo date("Y/m/d");
echo "<br />";
echo date("Y.m.d");
echo "<br />";
echo date("Y-m-d");
echo"<br/>";
echo date("h:i:s" ,time());

$i=0;
$display = 25;
while($i<10)
{
$x=0;
while($x<$display){
echo "$x hello World <br/>";
$x+=1;
}

$i += 1;
}
$display = 25;
if (empty($startrow)) {
    $startrow=0;
}


?>

and pagin.php is my pagination

<?php
$pagin = "<div id=\"options\">\r\n";
$start = 1;
$show = 10;
$current = 9;
$increment = 1;
if ($current <> 1){ $pagin .= "<a href=\"ok.php/" . ($current - 1) . ".php\">Previous</a>\r\n";
}
for ($i = $start; $i <= $show; $i += $increment) {
if ($i == $current) {
$pagin .= "$i\r\n";
} else {
$pagin .= "<a href=\"ok.php/$i.php\">$i</a>\r\n";
}
}
$pagin .= "<a href=\"ok.php/" . ($current + 1) . ".php\">Next</a>\r\n";
$pagin .= "</div>";
print $pagin;
?>

my problem is how ami going to display 25 hello world per page.

2
Contributors
1
Reply
3
Views
8 Years
Discussion Span
Last Post by mr.khurrams
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.