Hi I want to do some pagination with my array with my foreach loop so I did this:
$page = 0;
$i = 0;
foreach($time as $indTime){
if($i % 5 == 0){
$page++;
}
$i++;
}
So basically the first 5 result page = 1 the next 5 page=2 the next 5 page = 3 and so on. Now Im using twitter bootstrap and I want to use the pagination component which is basically links with << 1 2 3 4 5 >> to click on your page. What I need is when you click on 1, it shows every result from the foreach loop where $page = 1 when I click 2, $page = 2 etc. Anyone know how I could do this?