foreach iteration
| From: | Martin Kloss | Date: | Tue, 29 Jul 2003 13:34:02 +0000 |
| Subject: | foreach iteration | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9971@lists.php.net to get a copy of this message | ||
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