Re: [SMARTY] foreach iteration
| From: | Paul Lockaby | Date: | Tue, 29 Jul 2003 13:47:09 +0000 |
| Subject: | Re: [SMARTY] foreach iteration | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9973@lists.php.net to get a copy of this message | ||
Martin Kloss wrote:
Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s
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.
Why not use http://smarty.php.net/manual/en/language.function.counter.php
--
Paul Lockaby
paul@paullockaby.com
http://www.paullockaby.com
Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s