Sections assciative array

From: Date: Thu, 13 Sep 2001 09:31:57 +0000
Subject: Sections assciative array
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1475@lists.php.net to get a copy of this message
Hello, I'm using the Pager class to split results across multiple pages. This class returns an array containing, among other things, the number of pages. (http://vulcanonet.com/soft/index.php?pack=pager) Example, your query returns 20 results, you show 10 results per page so there are 2 pages. I would like to show direct links to those pages, so the user doesn' have to hit the 'next' button for every page. Know the array returned has the form array( 'PageNumber -> 'startrow') in our example : array(1 => 0, 2 => 10) So now, on to smarty, since i do not know how many pages i will get i use a section. The problem is that i don't know how use the associative array i get back I tried {section name=pages loop=$DATA.pages} <a href="{$SCRIPT_NAME}?from=???">??</a> {/section} Does anybody know how I could solve that problem ?

« previous php.smarty.general (#1475) next »