RE: foreach iteration

From: Date: Wed, 30 Jul 2003 05:55:53 +0000
Subject: RE: foreach iteration
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9993@lists.php.net to get a copy of this message
Hi Martin, you use: {$smarty.foreach.foreach_name.iteration} Maybe the documentation should be updated with this. Don't know from which version you can use this So actually your {$smarty.section.language.iteration} should work if you just replace section with foreach Martin > -----Original Message----- > From: Martin Kloss [mailto:martin.kloss@triquart.de] > Sent: 29. juli 2003 15:34 > To: smarty-general@lists.php.net > Subject: foreach iteration > > > 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 (#9993) next »