Re: [SMARTY] Sections with negative step param
| From: | Jason Sweat | Date: | Fri, 16 May 2003 11:16:20 +0000 |
| Subject: | Re: [SMARTY] Sections with negative step param | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9557@lists.php.net to get a copy of this message | ||
Not tested, but I think you need:
{section name=test loop=5 max=3 step=-1}
----- Original Message -----
From: "Gabriel Birke" <birke@kontor4.de>
To: <smarty-general@lists.php.net>
Sent: Friday, May 16, 2003 6:11 AM
Subject: [SMARTY] Sections with negative step param
> Hello!
>
> I've got the following section:
>
> {section name=test start=5 loop=3 step=-1}
> section={$smarty.section.test.index};<br>
> {/section}
>
> and i get the following output:
>
> section=2;
> section=1;
> section=0;
>
> I think this is strange because I expected the following output:
>
> section=5;
> section=4;
> section=3;
>
> Can anyone explain to me where my error of thought is? Is there
> anything I can do to produce the desired output except for {math}
> inside the section?
>
> With best regards
>
> Gabriel Birke
>
> --
> KONTOR4_Neue Medien
> Nelkenstrasse 3
> 31515 Wunstorf
> Germany
> +49 5031-955234
> +49 5031-955231
> mailto:birke@kontor4.de
> http://www.kontor4.de
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>