Welcome To ZPager Documentation

Created By: Zamblek
Thank you for purchasing this script. If you have any questions that are beyond the scope of this help file, please feel free to create a support thread on our support forum.. Thanks so much!

Instructions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Include the ZPager
include('../../ZPager.php');
 
// Data Gathering
$params['selected_page'] = ( (int) $_GET['page'] == 0) ? 1 : $_GET['page'];
$params['total_items'] = 250;
$params['items_per_page'] = 10;
$params['url'] = 'index.php?page=%s';
 
// Run Zpager
$zp = new ZPager($params);
 
// Display Zpager
$zp->display();

Parameters

  • selected_page - The current page
  • total_items - The total number of rows/data
  • items_per_page - The number of items per page
  • url - url to go after click a page
    1
    $params['url'] = 'index.php?page=%s';

Functions

  • getLimitSql() - Return the MySQL limit so you can use when retrive the data from the database
  • getPager() - Return ZPpager HTML structure as string
  • display() - Print the output from getPager() function