hi all,
I have an array of product codes $r
what i want to do is display a list of these codes but limit each page to just displaying 10 results, while using a paging system like << | 1 | 2 | >>
is this possible and any ideas on how to do this??
thanks
alex
paging an array
Moderator: General Moderators
This should give you an idea:
You should be able to expand on that to do what you want.
Code: Select all
<?php
if (!$n)
{
$n = 0;
}
for ($i = $n; $i <= $n + 10); $i++)
{
print $r[$i]."<br />";
}
$next = $n + 10;
$prev = $n - 10;
print "<a href="thispage.php?n=$next">Next Page</a><br />
<a href="thispage.php?n=$prev">Previous Page</a>";
?>