Help : section & loop
| From: | Toorop | Date: | Thu, 09 Sep 2004 12:13:51 +0000 |
| Subject: | Help : section & loop | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11780@lists.php.net to get a copy of this message | ||
Hi,
I didn't find how to do a template :
My array :
$my_array=Array
(
[dupont] => Array
(
[id] => 38
[prenom] => titi
[adresse] => DupontTown
.
.
.
)
[martin] => Array
(
[id] => 43
[prenom] => toto
[adresse] => MartinTown
.
.
.
)
)
I want a output like :
dupont | titi | DupondTown
martin | toto | MartinTown
But i find anything working :/
My *not working* template :
{section name=num_loop loop=$my_array}
<tr class="{cycle values="TabLigne1,TabLigne2"}">
<td height="21" >{i really don't know how to show tab key, ie dupont
for the first loop}</td>
<td >{$mon_tableau[num_loop].prenom}</td> // Not working show nothing
<td >{$mon_tableau[num_loop].adresse}</td> // Not working show nothing
.
.
.
</tr>
{/section}
Escuse my poor english, i hope you understand my problem, Thx ;-)
--
Toorop