Location: PHPKode > scripts > Page Navigator - with median > medianpage.php
<?php
error_reporting(E_ERROR);
ini_set('display_errors',1);
include ('PageNavigation.Class.php');
#change your server path here
define('WEB_URL','http://localhost/classes/pagination/');#set your url path
$iPage = $_REQUEST['page'];
$total = 256;
echo "No. of data: ".$total."<br/>";
 
$fileName = WEB_URL.'medianpage.php?page'; #set your file to be shown in page
$oPN = new PageNavigation; 
$aPageDetails = $oPN->getPageNavigation($iPage, $total, $fileName); 

#Array ( [navigation] => 1 2 3 4  next  [currentpage] => 1 [startpos] => 0 [limit] => 10 [noofpages] => 20 )

$navigation = $aPageDetails['navigation'];
echo "<div width='100%' align='center' style='padding:50px;margin:20px;'><div style='display:block;height:25;border:1px dotted green;width:360px;'>".$navigation."</div></div>";

?>
Return current item: Page Navigator - with median