<?php function paging($limit,$page,$disp=5){ $page = empty($_GET["page"])? 1: $_GET["page"]; $next = $page + 1; $prev = $page - 1; if($page != 1){ print '<a href="?page=' .$prev. '">« 前へ</a>'; } if($page < $limit){ print '<a href="?page='.$next.'">次へ »</a>'; } } $limit = 10; $page = empty($_GET["page"])? 1:$_GET["page"]; ?>