Using Section with variable multi-dimensional array
| From: | Kleber Rodrigo | Date: | Wed, 12 Mar 2003 14:45:22 +0000 |
| Subject: | Using Section with variable multi-dimensional array | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8575@lists.php.net to get a copy of this message | ||
Hi guys!
I´m Brazilian and my english isn´t the best, so I´m sorry if I write something wrong, ok?
The question:
I´m using smarty´s section to create an table with a multi-dimensional array, this way:
{section name=indice loop=$Relatorio}
<tr>
<td>
{$Relatorio[indice][0]}
</td>
<td>
{$Relatorio[indice][1]}
</td>
<td>
{$Relatorio[indice][n]}
</td>
</tr>
{sectionelse}
<tr><td>Não há registros.</td></tr>{/section} My problem is that the number of fields change dinamically. Anyone can help me to make this script more efficient to work with dynamic arrays? Thanks in advance Kleber