"; if ($prev >= 0) { echo "Prev | "; } else { echo "Prev | "; } echo " | ";
$page = 1;
$x = $pagelimit;
for ($x = 0; $x < $total; $x++) {
$pagestr = str_pad($page, 2, '0', STR_PAD_LEFT);
if (0 == ($x % $pagelimit)) {
if ($x == $start) {
echo "" . $pagestr . " ";
} else {
echo "" . $pagestr . " ";
}
if (!($page % 10)) echo " "; $page++; } } echo " | "; if ($next < $total) { echo " | Next"; } else { echo " | Next"; } echo " |