PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am sorry for asking such a simple question but I am desperate to find the answer as I am still a novice in PHP and I need this to be done. I used search but still it did not help me solve my problem.
I need to add pagination above and below the results, which can be adjusted by a variable in the code. Please help me with that, I will be very grateful, I hope I will be able to learn from that! Thank you very much in advance!
$number_of_pages = ceil(sizeof($base)/$items_per_page); //ceil rounds pages up to show all
//where you want the pageination put
for($p=0; $p<$number_of_pages; $p++){
print('<a href="?page='.($p+1).'">Page '.($p+1).'</a> ');
}