Re: [SMARTY] Need both Section and Foreach functionality.

From: Date: Wed, 16 Apr 2003 22:26:53 +0000
Subject: Re: [SMARTY] Need both Section and Foreach functionality.
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9286@lists.php.net to get a copy of this message
On Wed, Apr 16, 2003 at 03:39:37PM -0600, Rob Adams wrote: > Hi. Long time reader, first time poster. > > I have a {foreach ...} and I need to be able to get which loop I'm on inside > of it. I've tried stuff like: > $smarty.foreach.foreach_name.index > $smarty.foreach_name.index {foreach key=index ...} .... {$index} ... to get the current index in an associative array { foreach name=foo ...} ... {$smarty.foreach.foo.iteration} ... to get the current iteration (=integer-count) of the specific loop. HTH messju > I've also looked through all the messages I could find in the newsgroup. I > have an associated array, but I also need to know which iteration of the > loop I'm on. Is there currently a way to do this? Thanks. > > -- Rob

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