문제

I have lookup many similar script but didn't work

There's current code

<?php
   $LimitPerPage = 3;

   $CurrentPage = 1;
   if(isset($_GET['p'])){
      $CurrentPage = $_GET['p'];
   }

   $PageOffset = ($CurrentPage - 1) * $LimitPerPage;
   $image = imagedb::find_all_by_owner($email,array('limit' => $LimitPerPage,'offset' => $PageOffset));
   $TotalPage = ceil(count($linkerimage)/$LimitPerPage);

   if(!is_null($image)){
    // ..show image code
   }
?>

How can I develop a navigation bar for switching page?

Eg. Prev [1] [2] [3] [4] ... [64] Next

Bold is current page.

도움이 되었습니까?

해결책

You can copy the pagination logic from here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top