|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Bagroff Smarty n00b
Joined: 11 May 2003 Posts: 1
|
Posted: Sun May 11, 2003 12:33 pm Post subject: bug in Smarty ? Array's ... |
|
|
I have some problems with Smarty 2.5
Array looks like:
$program[i][x][j][time]
$program[i][x][j][name]
doing
... ->assign('program', '$program');
in template
{section name=x loop=$program start=1 max=20}
<DIV><strong class="time">{$program[0][0][x].time}</strong>{$program[0][0][x].name}</DIV>
{/section}
In result, i can see that deduces only two lines. e.g. 2 elements from an array. Actually there of their pieces 40...
If to look Smarty Debug Console with array everything Ok.
In what a problem?
/*
* @link http://smarty.php.net/
* @copyright 2001,2002 ispi of Lincoln, Inc.
* @author Monte Ohrt <monte@ispi.net>
* @author Andrei Zmievski <andrei@php.net>
* @package Smarty
* @version 2.5.0
*/ _________________ www.ikomi.ru |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sun May 11, 2003 12:56 pm Post subject: |
|
|
Yes. loop=$program is iterating over only the outermost part of your array. I think you want to use:
loop=20
or better:
loop= $program.key1.key2 |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|