|
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 |
Olvi Smarty n00b
Joined: 11 Nov 2004 Posts: 2
|
Posted: Thu Nov 11, 2004 10:25 am Post subject: foreach and assign |
|
|
I thing this is smarty-bug or is it just me
arr = array( array("id" => 1) );
this is NOT working:
{foreach item="n" from=$arr}
{assign var="ed" value="$n[id]"}
{$ed}
{/foreach}
this is working:
{foreach item="n" from=$arr}
{php}extract($this->_tpl_vars);{/php}
{assign var="ed" value="$n[id]"}
{$ed}
{/foreach} |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
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
|