Help with the pagination class.

#2
[eluser]Twisted1919[/eluser]
Heh, i found the answer by myself today in 5 minutes, it's amazing how being rest can think clearly Smile
here is the answer if somebody ever has this issue .
Code:
$segment = $this->uri->segment(3,0);
$num_results = 44 ;//number of results taken out from the database .
$perpage = 5 ;

$start = ($segment == 0 ) ? 1 : $segment ;
$end = (($segment+$perpage) < $num_results ) ? ($perpage + $segment) : $num_results ;
$data['showing'] = 'Listing '.$start.' - '.$end.'  of '.$num_results.' articles';

So, pretty simple ...


Messages In This Thread
Help with the pagination class. - by El Forum - 10-09-2009, 03:47 PM
Help with the pagination class. - by El Forum - 10-10-2009, 04:41 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.