$頁 = 1; $總計 = 20; $prevs = $page - 4; if($prevs 一= $page + 4; if($next > $total) { $next = $total;}for($i = $prevs; $i echo $i."rn";}echo '['.$page.']'."rn";for($i = $page + 1; $i echo $i."rn";}