|
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 |
shulya Smarty n00b
Joined: 12 Jan 2004 Posts: 1 Location: Kiev
|
Posted: Mon Jan 12, 2004 11:48 am Post subject: FOREACH bug |
|
|
when I use more than 1 dimention array in foreach - I recive error message
For example:
{%foreach key=$num item=author from=$article.authors%}
I recive PHP error message.
I change Smarty_Compiler.class.php line 1080:
$key_part = "\$this->_tpl_vars[$key] => ";
Thanx |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Jan 12, 2004 12:06 pm Post subject: Re: FOREACH bug |
|
|
shulya wrote: | when I use more than 1 dimention array in foreach - I recive error message |
wrong. when you use variables instead of variable-names as "key" or "value" you receive the message you posted.
use "key=num" not "key=$num". |
|
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
|