File: index.php

Recommend this page to a friend!
  Classes of Eugene Panin  >  Pager  >  index.php  >  Download  
File: index.php
Role: ???
Content type: text/plain
Description: Usage example
Class: Pager
Author: By
Last change:
Date: 20 years ago
Size: 596 bytes


Class file image Download
<body bgcolor=white>
<h2>Example of Pager object.</h2>
require "Pager.php";
require "Page.php";

# setting up target array
for ($i=0;$i<123;$i++) {

$elems_per_page = 12;
$pager = new Pager($ar,$elems_per_page);

# $pageno - input parameter
if (empty($pageno)) {
        $pageno = 1;

#printing page nummbers

echo "<p>";
# printing page result
$page = $pager->page($pageno);
while (list($key,$val)=each($page->result)) {
        echo "$val<br>";


For more information send a message to info at phpclasses dot org.