phpPagination Source code of phppagination/example1.php


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<head><title>phpPagination: Example 1: simplest usage of pagination class</title></head>
<html><body>
<?php

require_once('phppagination.class.php');

$nTotalItems 777;

// get page number passed via GET method
if (isset($_GET['page']))
    
$nCurrentPage $_GET['page'];
else
    
$nCurrentPage 1;

// create pagination object
$oPagination = new phpPagination ($nTotalItems);

// print pagination for $nCurrentPage
echo $oPagination->GetHtml($nCurrentPage);

?>

</body></html>
back
sourceforge.net freshmeat.net