Re: loop
| From: | Andrei Zmievski | Date: | Tue, 27 Mar 2001 14:06:54 +0000 |
| Subject: | Re: loop | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-450@lists.php.net to get a copy of this message | ||
On Tue, 27 Mar 2001, Ivo Jansch wrote:
> Hi,
>
> why doesn't this work:
>
> index.php:
>
>
> $smarty->assign("list",Array("names"=>Array("sjappie","flappie","happie")));
>
> index.tpl:
>
> <ul>
> {section name="sec1" loop=$list.names}
> <li>{$sec1/list.names}
> {/section}
> </ul>
>
> I can see the bullets, but no names..
Because Smarty first indexes by section iteration and then by string
keys..
-Andrei
A room without books is like a body without a soul.
-- Marcus Tullius Cicero (106-43 B.C.)