<html>
<head><title>PHP TEST</title></head>
<body>

<p>テスト</p>

<?php
require_once("Pager/Pager.php");

$totalItems = 11;
$perPage = 3;

$options = array(
  "totalItems" => $totalItems,
  "perPage" => $perPage
);

$pager =& Pager::factory($options);
$navi = $pager -> getLinks();
print($navi["all"]);

$currentPageID = $pager -> getCurrentPageID();
$index = ($currentPageID - 1) * $perPage + 1;

print("<p>");
for($i = $index; $i < $index + $perPage ; $i++){
  if ($i <= $totalItems){
    print('<img src="./img/no'.$i.'.png">');
    print(" ");
  }
}
print("</p>");
?>

</body>
</html>