Re: Section loops and Arrays
| From: | Andrei Zmievski | Date: | Mon, 24 Sep 2001 15:12:34 +0000 |
| Subject: | Re: Section loops and Arrays | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1533@lists.php.net to get a copy of this message | ||
On Mon, 24 Sep 2001, Andreas Kossmeier wrote:
> currently you can't loop correctly through arrays like
>
> array(4) {
> [3]=>
> string(1) "1"
> [4]=>
> string(1) "2"
> [5]=>
> string(1) "3"
> [8]=>
> string(1) "3"
> }
>
> or associative arrays. you've always to rewrite the array for use in
> smarty. monte, andrei, any efforts to make this work in the future?
> maybe using 'foreach' or a while...list...each construct?
I did make an effort but the fact is that only for() construct allows us
to loop through multiple arrays at once. The other ones are limited to a
single array. That said, I will keep thinking on how to make it work.
-Andrei
A room without books is like a body without a soul.
-- Marcus Tullius Cicero (106-43 B.C.)