Re: [SMARTY] foreach iteration
| From: | messju mohr | Date: | Tue, 29 Jul 2003 14:00:47 +0000 |
| Subject: | Re: [SMARTY] foreach iteration | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9976@lists.php.net to get a copy of this message | ||
On Tue, Jul 29, 2003 at 03:39:30PM +0200, Wom.bat wrote:
> $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
it iiiiiisssss but only in cccccccvvvvvvvvsssss! :)
i know you have a checkout, so have a lot of fun with the jade- and
docbook-voodoo ;)
> 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
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php