Re: [SMARTY] Associative Arrays and {section .. }
| From: | David Förster | Date: | Wed, 16 Jun 2004 05:30:26 +0000 |
| Subject: | Re: [SMARTY] Associative Arrays and {section .. } | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11464@lists.php.net to get a copy of this message | ||
Hello,
try to use a foreach loop.
http://smarty.php.net/manual/en/language.function.foreach.php
- david
On Wed, 16 Jun 2004 13:29:45 +1200
Brett Taylor <brett@webfroot.co.nz> wrote:
> Hi all,
>
> I've got an associative array (ie, a hash) that i'm feeding my
> templates... it doesn't start at 0, but it does have numbers, but they
> are not sequential... ie
>
> Array ( '1' => array(..), '4' => array(..), '8' =>
> array(..) ...);
>
> Now it seems to me that {section} is expecting a plain old
> non-associative array... and thus, it's generating blank output...
>
> Anyone had this problem and solved it?
>
> Cheers,
>
> --
> Brett Taylor
> - Webmaster
> www.webfroot.co.nz
>
> ph: +64 (21) 0355193
> email: brett@webfroot.co.nz
>
> icq: 8473626
> msn: weednix@hotmail.com
> jabber: Glutnix@jabber.com
> y!: glutnix@yahoo.com.au
> aim: webfroot
>
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]