View Single Post
Old 01-03-2010, 03:06 PM   #15 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

The use of the filter extension bears little relation to the chunk of code which paginates the file's contents; it's just there as an easy way to get, filter, validate the provided page number.

You can always fall back on the old style:
PHP Code:
$page 1;
if (isset(
$_GET['page']) 
    && 
ctype_digit($_GET['page']) 
    && 
$_GET['page'] <= 1000 
    
&& $_GET['page'] >= 1
) {
    
$page = (int) $_GET['page'];

Salathe is offline  
Reply With Quote