Re: Sv: Re: New looping method proposal
| From: | Andrei Zmievski | Date: | Wed, 21 Nov 2001 19:22:46 +0000 |
| Subject: | Re: Sv: Re: New looping method proposal | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2001@lists.php.net to get a copy of this message | ||
On Wed, 21 Nov 2001, Ivo Jansch wrote:
> {loop source=$data as=$element index=$i}
> {$element} and {$data[$i]} are then equivalent.
> {/loop}
>
> If you want to iterate through an associative array, you'd probably do:
>
> {loop source=$data as=$value index=$key}
How are these different, really? And it would be this I guess:
{loop source=$data as=value index=key}
No $ signs in front of variable names.
-Andrei
The main reason Santa is so jolly is because he knows where
all the bad girls live. -- George Carlin