i have a page which shows previous 1 2 3 4 5 next for my results, yet i need to limit the amount of pages shown, how could i adapt this script to do so
// show page numbers
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i&&group_id=$group_id\">$i</a> ";
}
}
any help would be much appreciated