Re: associative array section

From: Date: Thu, 24 Apr 2003 13:28:51 +0000
Subject: Re: associative array section
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9370@lists.php.net to get a copy of this message
Wkutting schrieb in php.smarty.general: > 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} You can also use {foreach}: {foreach item=customer from=$contacts.sum} name: {$customer.name}<br> home: {$customer.home}<br> cell: {$customer.cell}<br> e-mail: {$customer.email}<p> {/foreach}

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