[Solved] How to pagination [closed]


I will explain the basic logic behind the pagination.

  1. Find the total number of items
  2. How many items do you want to show on one page
  3. Then divide total number of items by items per page to get the total number of pages
  4. Call a function on next and prev buttons to fetch the relevant items. If you are using MySQL query to fetch data. You can use LIMIT option in query to fetch the desired records.

These are basic steps, however, I will recommend you to use some tested script for this purpose. Otherwise, you need to handle all the possible scenarios which will be really complex for you.

solved How to pagination [closed]