Re: [SMARTY] foreach iteration

From: Date: Tue, 29 Jul 2003 13:39:30 +0000
Subject: Re: [SMARTY] foreach iteration
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9972@lists.php.net to get a copy of this message
$smarty.foreach.name.iteration works indeed, just like .first, .last etc... with foreach it's merely the same as with sections, but it has't all of the variables, for obvious reasons ;) see: http://smarty.php.net/manual/en/language.function.section.php it's just not documented for foreaches (moooooonte... meeeeessju ;)) David On Tuesday, July 29, 2003 3:34 PM +0200, Martin Kloss wrote: > Hi there, > > how can I get at the iteration value in a foreach loop > without declaring a custom var that I manually increment? > hmm, I guess I can't....ideas? > > Example: > > {foreach from=$qualification_languages item=language} > {* language is an array *} > No. {$smarty.section.language.iteration} > {$language.level} > {/foreach} > > So something like "$smarty.foreach.language.iteration" would be nice. > > Martin. > > > Martin Kloss > martin.kloss@triquart.de > Technische Direktion > > ************************ > Triquart Neue Medien > Bellealliancestr.17 > 20259 Hamburg > Germany > Tel.+49 (40)432 923-0 > Fax +49 (40)432 923-23 > www.triquart.de > www.triquart-humor.de > ************************* > > "Lingo objektorientiert" > Das Buch zum Autor jetzt bestellen unter: > http://www.amazon.de/exec/obidos/ASIN/3898422194/lingmmugd

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