phpPagination Source code of demo2.php


<?php

// redefine output for pagination elements
$aOptions['first'] = '<a href="__PHP_SELF__?page=__PAGE_NUMBER__">First</a>';
$aOptions['last'] = '<a href="__PHP_SELF__?page=__PAGE_NUMBER__">Last</a>';
$aOptions['next'] = '<a href="__PHP_SELF__?page=__PAGE_NUMBER__">Next</a>';
$aOptions['prev'] = '<a href="__PHP_SELF__?page=__PAGE_NUMBER__">Prev</a>';

$aOptions['separator'] = '&nbsp;|&nbsp;';
$aOptions['delimiter'] = '&nbsp;|&nbsp;&hellip;&nbsp;|&nbsp;';

$aOptions['current_page'] = '<b>[__PAGE_NUMBER__]</b>';

$aOptions['suffix'] = '&nbsp;(page __CURRENT_PAGE__ of __TOTAL_PAGES__)';

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

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

?>
back
sourceforge.net freshmeat.net