Documentation example
| From: | Alain Fontaine | Date: | Wed, 02 May 2001 11:10:28 +0000 |
| Subject: | Documentation example | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-656@lists.php.net to get a copy of this message | ||
Hello,
<-- snip -->
{* This is an example of printing an associative array
of data within a section *}
{section name=customer loop=$contacts}
name: {$customer/contacts.name}<br>
home: {$customer/contacts.home}<br>
cell: {$customer/contacts.cell}<br>
e-mail: {$customer/contacts.email}<p>
{/section}
<-- snip -->
In this example, how is the contacts array built in PHP? Like this, for
instance, doing it completely manually:
$contacts[0][name] = "bla";
$contacts[0][home] = "tsss";
$contacts[0][cell] = "123";
$contacts[1][name] = "bla";
$contacts[1][home] = "tsss";
$contacts[1][cell] = "123";
In other words, is the $contacts array a two-dimensional array where the
second dimension's keys are name,home,cell and email ?
Thanks !
------
Alain Fontaine
Analyst-Programmer
NVision s.à.r.l.