double the number of iterations of a section
| From: | Dennis Gearon | Date: | Mon, 28 Apr 2003 23:36:32 +0000 |
| Subject: | double the number of iterations of a section | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9411@lists.php.net to get a copy of this message | ||
I've got an array that gets interated over twice as many times as necessary. 10 times instead of 5. It's a database query result. Anyone know why?
The array:
---------------
Array
(
[0] => Array
(
[0] => 42
[event_id] => 42
[1] => 2003-01-01
[date_begin] => 2003-01-01
[2] => 2004-01-01
[date_end] => 2004-01-01
[3] => Aviation - Kitty Hawk
[centennial_name] => Aviation - Kitty Hawk
[4] => Items marked with are required
[event_name] => Items marked with are required
)
[1] => Array
(
[0] => 43
[event_id] => 43
[1] => 2003-01-01
[date_begin] => 2003-01-01
[2] => 2004-01-01
[date_end] => 2004-01-01
[3] => Aviation - Kitty Hawk
[centennial_name] => Aviation - Kitty Hawk
[4] => Event Name or Title:
[event_name] => Event Name or Title:
)
the template code:
----------------------
{section name=outer loop=$list}
<tr>
{section name=inner loop=$list[outer]}
<td>{$list[outer][inner]}</td>
{/section}
</tr>
{/section}