Problem with section
| From: | Juzan Jean-Michel | Date: | Tue, 25 Feb 2003 03:28:13 +0000 |
| Subject: | Problem with section | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8165@lists.php.net to get a copy of this message | ||
Hi,
I use stable 2.4.2
I have an associative array
$Machines[1][ID] = 1
$Machines[1][DonID] = 1
$Machines[1][Qte] = 5
$Machines[2][ID] = 2
$Machines[2][DonID] = 3
$Machines[2][Qte] = 7
$Machines[3][ID] = 3
$Machines[3][DonID] = 4
$Machines[3][Qte] = 2
$Machines[4][ID] = 4
$Machines[4][DonID] = 2
$Machines[4][Qte] = 9
$Machines[5][ID] = 5
$Machines[5][DonID] = 2
$Machines[5][Qte] = 10
With section if I use {section name=Machine loop=$Machines}
Output
0 0 0
1 1 5
2 3 7
3 4 8
With section if I use {section name=Machine loop=$Machines start=1}
1 1 5
2 3 7
3 4 8
4 2 9
How I can do to have ?
1 1 5
2 3 7
3 4 8
4 2 9
5 2 10
I have no problem with section when I'm not in this case (for example
1000, 1001, 1002, ...)
Thank's in advance.
Regards.
{section name=Machine loop=$Machines start=1}
<tr>
<td>{$Machines[Machine].ID|string_format:"%05s"}</td>
<td>{$Machines[Machine].DonID|string_format:"%05s"}</td>
<td align=right>{$Machines[Machine].QteDon}</td>
<td bgcolor="{if
!$Machines[Machine].Statut}green{else}red{/if}">{$Machines[Machine].StatutLib}</td>
</tr>{/section}
--
Jean-Michel Juzan jmjuzan@ecreasol.ch
Direction Informations & Technologies
eCreaSol - NetWork Creative Solutions SARL - http://www.ecreasol.ch/
PGP public keys server : http://www.keyserver.net
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc