I am using the pager class (from pear) in PHP. I am not sure if I am using it right, but I downloaded some code from Internet where I can include a pager class and call the pager function.. This is how I am calling the Pager function in my php page...
require_once('pager/Pager.php');
$pager_options = array(
'mode' => 'Sliding',
'append' => false,
'perPage' => 30,
'delta' => 4,
'fileName' => '/temp-%d.htm',
'currentPage' => $pagenum,
'totalItems' => $rows,
'curPageLinkClassName' => 'active',
'separator' => '',
'nextImg' => '<strong>Next</strong> »',
'prevImg' => '« <strong>Previous</strong>',
'spacesBeforeSeparator' => 0,
'spacesAfterSeparator' => 0,
'clearIfVoid' => true
);
$pager = Pager::factory($pager_options);
echo '<div align="center" id="pagination">' . $pager->links . '</div>';
Now, it works fine, but my problem is, for the first page the link would be temp-1.htm, but I want it as temp.htm or temp/index.htm... For other pages, temp-2.htm, temp-3.htm is fine..
Is there any work around? Thanks in advance...