Scriptindex.de

[ Menü ]

Home
News
Scripts
Neuzugänge
Suchen
Bücher
Manuals

[ Inhalt ]

Script eintragen
Tutorial eintragen
Newsletter
Umfragen
Link zu uns
Werbung bei uns
Kontakt
Impressum

[ Statistik ]

Hits gesamt: 5202150
Hits Heute: 253
max. Hits (10.07.07): 6964
User Online: 40
Scripts: 2828

[ Partner ]

CodeBase
I.S.U.M.
LUG Bayreuth
PEAR NEWS
PHP Classes

[ Facebook ]

[ Eigene Domain? ]

[ Buchtipp ]

Das HTML /XHTML Buch. mit Cascading Style Sheets und einer Einführung in XML
Das HTML /XHTML Buch. mit Cascading Style Sheets und einer Einführung in XML

Manuals > PEAR > Pager::getperpageselectbox

Pager::getperpageselectbox()

Pager::getperpageselectbox() -- Returns a string with a XHTML SELECT menu, to choose how many items per page should be displayed.

Parameter

  • integer $start - Min. number of items per page (optional) integer $end - Max. number of items per page (optional) integer $step - Increment between two options (optional)

Description

Returns a string with a XHTML SELECT menu, useful for letting the user choose how many items per page should be displayed. If parameter useSessions is TRUE, this value is stored in a session var. The string isn't echoed right away so you can use it with template engines.

Example

This example shows how you can create a select box to let your users choose the number of items to display on each page.
include 'Pager/Pager.php'; $params = array( 'mode' => 'Jumping', 'perPage' => 3, 'delta' => 2, 'itemData' => array('a','b','c','d','e',[...omissis...],'z') ); $pager = &new Pager($params); $selectBox = $pager->getPerPageSelectBox(); echo '<form action="'.$_SERVER['PHP_SELF'].'" method="GET">'; echo $selectBox; echo '<input type="submit" value="submit" />'; echo '</form>';

Return value

return string with the XHTML SELECT menu.


Copyright 1998 - 2009 by I.S.U.M.