PHP Classes

File: examples/array.php

Recommend this page to a friend!
  Classes of Mark Rolich   Extended Generic Pager   examples/array.php   Download  
File: examples/array.php
Role: Example script
Content type: text/plain
Description: Example of array pagination
Class: Extended Generic Pager
Paginate data listings from arrays, CSV or MySQL
Author: By
Last change: Update of examples/array.php
Date: 11 months ago
Size: 321 bytes
 

Contents

Class file image Download
<?php
include '../Pager.php';
include
'../PagerArray.php';
include
'data.php';

$pageNum = (isset($_GET['p']) && $_GET['p'] != '') ? (int)$_GET['p'] : 1;

$pager = new PagerArray($pageNum);
$data = $pager->getData($data);

$pagerNav = $pager->render();

$pageTitle = 'Pager - Array example';
include
'example.tpl.php';
?>