pagination help.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    pagination help.

    hello mates,
    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>";
    }
    }

    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

    #2
    cant you just copy and paste it from johncms ?

    Comment


      #3
      johncms supports what i want but i couldnt copy it to my script..

      Comment

      Working...
      X