Re: AW: [SMARTY] Paging
| From: | Richard Watt | Date: | Thu, 12 Dec 2002 11:25:33 +0000 |
| Subject: | Re: AW: [SMARTY] Paging | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6748@lists.php.net to get a copy of this message | ||
How can you do 'Viewing records 6-12 of 403'
'<<first page <previous page | next page> last page>>' using a loop?
Sure, I use a loop to get the data out of the database, and a smarty
{section} tag to display it but im talking about the logic behing
generating the paging text & links, and whether there is a more
efficient way to do it using Smarty than i'm currently using.
-- Richard
In article <Pine.BSO.4.50.0212122147530.1876-100000@ausmac.net>,
bok@ausmac.net says...
> I just do all that logic in the PHP with a for loop, and an array with all
> the results. ie
>
> for ($i = firstresult, $k = lastresult; $i < $k;$i++)
> $newresults[] = $results[$i];
>
> -bok
>
>