1) { echo "
  • ‹‹
  • "; $prevpage = $currentpage - 1; if ($prevpage==1){ echo '
  • ';}else{ echo "
  • "; } } for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) { if (($x > 0) && ($x <= $totalpages)) { if ($x == $currentpage) { echo '
  • '.$x.'
  • '; } else { if ($x==1){ echo '
  • '.$x.'
  • '; }else{ echo "
  • ".$x."
  • "; } } } } if ($currentpage != $totalpages) { $nextpage = $currentpage + 1; echo "
  • "; echo "
  • ››
  • "; } ?>