FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Pear Pager and $pager->linkTags
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Pear Pager and $pager->linkTags [message #170739 is a reply to message #170738] Wed, 17 November 2010 21:03 Go to previous messageGo to previous message
Chris Percol is currently offline  Chris Percol
Messages: 5
Registered: November 2010
Karma:
Junior Member
On Nov 17, 9:01 pm, Chris Percol <chris.per...@gmail.com> wrote:
> I am using pear package pager 2.4.8 on PHP 5.2.14 and can't get $pager-
>
>> linkTags to work yet $pager->links works no problem?
>
> Anybody any thoughts?
>
> Thanks,
>
> Chris

Apologies, should have included code.

<?php
require_once 'Pager/Pager.php';

$data = range(1, 4); //an array of data to paginate
$params = array(
'mode' => 'Sliding',
'append' => false,
'path' => '',
'fileName' => 'javascript:HTML_AJAX.replace(\'target\',\'data.php?
pageID=%d\');',
'perPage' => 1,
'delta' => 1,
'itemData' => $data,
);
$pager = & Pager::factory($params);
$links = $pager->getLinks();

echo '<p>This container is loaded with an AJAX call</p>';
echo '<p><span class="datetime">DateTime: '. date('Y-m-d H:i:s') .'</
span></p>';
echo '<h3>Page '. $pager->getCurrentPageId() .'</h3>';

foreach ($pager->getPageData() as $item) {
echo 'Item '. $item .'<br />';
}

echo '<hr />'.$pager->linktags;
?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Software Development Company
Next Topic: Create an RTF table
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 23:11:46 GMT 2024

Total time taken to generate the page: 0.04294 seconds