hello mates,
iam using this pagination script
but its print many page and looks sux.
please how to make it looks like johncms when it more than 4 pages e.x [1] [2] [3] ... [14]
thanks
iam using this pagination script
PHP Code:
if($page == ceil($NumOfPages) && $page != 1)
{
for($i = 1; $i <= ceil($NumOfPages) -1; $i++)
{
if($i > 0)
{
echo "<a class=\"pagenav\" href=\"index.php?page={$i}\">{$i}</a>"; }
}
}
if ($page == ceil($NumOfPages)) {
$startPage = $page;
} else {
$startPage = 1;
}
for ($i = $startPage; $i <= $page +6; $i++)
{
if ($i <= ceil($NumOfPages)) {
if($i == $page)
{
echo "<span class=\"currentpage\"><b>{$i}</b></span>";
} else {
echo "<a class=\"pagenav\" href=\"index.php?page={$i}\">{$i}</a>";
}
}
}
please how to make it looks like johncms when it more than 4 pages e.x [1] [2] [3] ... [14]
thanks
Comment