PHP Classes

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: 23 years ago
Size: 596 bytes


Class file image Download
<html> <body bgcolor=white> <h2>Example of Pager object.</h2> <p> <p> <? require "Pager.php"; require "Page.php"; # setting up target array $ar=array(); for ($i=0;$i<123;$i++) { $ar[]=$i; } $elems_per_page = 12; $pager = new Pager($ar,$elems_per_page); # $pageno - input parameter if (empty($pageno)) { $pageno = 1; } #printing page nummbers $pager->printPageNumbers($pageno,'series'); echo "<p>"; # printing page result $page = $pager->page($pageno); while (list($key,$val)=each($page->result)) { echo "$val<br>"; } ?> </body> </html>