Fw: [SMARTY] associative array section

From: Date: Thu, 24 Apr 2003 11:14:39 +0000
Subject: Fw: [SMARTY] associative array section
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9369@lists.php.net to get a copy of this message
"wkutting" <wkutting@gmx.de> wrote in message news:20030424094806.69282.qmail@pb1.pair.com... > why doesn't that work ? > ($contacts is $contacts['sum'] from the php-script to smarty) > > {section name=customer loop=$contacts.sum} > name: {$contacts.sum[customer].name}<br> > home: {$contacts.sum[customer].home}<br> > cell: {$contacts.sum[customer].cell}<br> > e-mail: {$contacts.sum[customer].email}<p> > {/section} Untested code from the top of my head, but I recall writing something like: {assign var=cust_rec value=$contacts.sum} {section name=c loop=$cust_rec} name: {$cust_rec[c].name}<br /> ... {/section} HTH Jason

« previous php.smarty.general (#9369) next »