Location: PHPKode > scripts > PageLite > pagelite/example.php
<style>
.pagination
{
	font-size: 13px;
	font-family: Georgia;
	color: #000;
}

.pagination a
{
	text-decoration: none;
}
</style>
<?php

require 'pagelite.php';

// Simple Usage
$pageLite = new Page_Lite(50, 'example.php');

echo 'Simple Output <br />';
echo $pageLite->build();

// Advanced Usage

$pageLiteAdv = new Page_Lite(75, 'example.php');

// Config Options
$pageLiteAdv->setAutoIdentifier(true);
$pageLiteAdv->setIdentifier('p');
$pageLiteAdv->setPerPage(1);
$pageLiteAdv->setPageJumpCount(10);
$pageLiteAdv->setRange(5);
//$pageLiteAdv->setCurrentPage('125');
$pageLiteAdv->setStyleArray(array(
                                  'start' => '<div class="pagination">',
                                  'end'   => '<br /> You are current on page '.$pageLiteAdv->getCurrentPage().' of '.$pageLiteAdv->getTotalPages().'</div>',
                                  'first_start' => '<em>',
                                  'first_end' => '</em>',
                                  'current_start' => ' { <b>',
                                  'current_end' => '</b> } ',
                                  'next_start' => '<em>',
                                  'next_end' => '</em>',
                                  'prev_start' => '<span style="text-decoration: underline;">',
                                  'prev_end' => '</span>',
                                  'link_start' => ' [ ',
                                  'link_end' => ' ] ',
                                  'last_start' => '<em>',
                                  'last_end' => '</em>',));
$pageLiteAdv->setLinkFirst('Page 1');
$pageLiteAdv->setLinkLast('Go to Page '.$pageLiteAdv->getTotalPages());
$pageLiteAdv->setLinkPrev('Prev');
$pageLiteAdv->setDisplayLinkNext(false);
$pageLiteAdv->setDisplayLinkPrev(false);


echo '<br /><br />
Advanced Output <br />';

echo $pageLiteAdv->build();

// Example Database com with PageLite
$start = $pageLiteAdv->getStart();
$limit = $pageLiteAdv->getPerPage();

?>

Adv Results
Page 1 [ 4 ] [ 6 ] [ 8 ] [ 11 ] [ 14 ] [ 19 ] [ 20 ] [ 21 ] { 22 } [ 23 ] [ 24 ] [ 25 ] [ 29 ] [ 34 ] [ 40 ] [ 46 ] [ 53 ] Go to Page 75
You are current on page 22 of 75
Return current item: PageLite