Re: [SMARTY] Using (or not) associative arrays
| From: | schultzr at kattare dot com | Date: | Thu, 06 Mar 2003 02:14:40 +0000 |
| Subject: | Re: [SMARTY] Using (or not) associative arrays | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8423@lists.php.net to get a copy of this message | ||
Quoting Per Nystrom <centaur@netmagic.net>:
> I've come to understand that Smarty templates can't retrieve the
> key
> values in associative arrays, so I have to flatten them. If my
> understanding so far is correct, then what I'm trying to do is
> probably a
> nightmare in Smarty.
>
>
>
> I'm sure that others have faced this before, and there has to
> be a better way. I'm wondering now if it's even worth it to try to
> make a
> generic form template. Has anybody found an elegant solution to
> this?
>
> Thanks,
> Per
>
>
Wouldn't it just be easier to use a foreach loop which then you can
acccess the associative array?
http://smarty.php.net/manual/en/language.function.foreach.php