hye guys..this is my second request regarding pagination..i want to make my display in multiple pages ...
i've found the script for paginating the results got from database...
but my output is not from databse..i temporarily keep my data in array...
i do understand the calculation..but my problem is how do i divide my array into slices..i couldnt pass the other remaining to next page..and how to link to next page and so on...
i've used this..but the remaining i guess is totally cut..my array here is $results..i'm displaying the output in table..
for($i=0;$i<count($results);$i++){
$page =0;
if($page<=0){
$page = 1;
}
$display = 10;
$num_of_page = intval(count($results)/$display);
if($results%$display){
$num_of_page++;
}
$start = ($page*$display)-$display;
$results = array_slice($results,$start,$display);
if (!empty($results[$i][4])){
?>
<table width="730" style="border-bottom-style:dotted ">
<tr>
<td height="100" width="650" align="left"><?php echo $results[$i][1];?> </td>
<td height="100" width="80" align="center">
<?php echo $results[$i][2]."<br>".$results[$i][3]."<br>".$results[$i][4];?>
</td>
</tr>
</table>
<?
}