Posted by boots on 08/11/05 23:59
--- Matt Warden <mwarden@gmail.com> wrote:
> smarties,
>
> I was hoping that there was a way to do a foreach in reverse (i.e.,
> starting with the last element and ending with the first). After
> seeing that there doesn't seem to be, I tried to work out the
> equivalent of a 'foreach in reverse' with sections and a negative
> step. Does someone have an example of doing this?
Hi.
I assume that this would work:
{foreach from=$myarray|@array_reverse:true item=foo} ...
See:
- http://smarty.php.net/manual/en/language.modifiers.php
- http://php.net/array_reverse
HTH
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Navigation:
[Reply to this message]
|