|
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 |
dobs Smarty Rookie
Joined: 29 Dec 2010 Posts: 25 Location: Kyiv / Ukraine
|
Posted: Fri Jan 14, 2011 1:57 am Post subject: foreach input array key... |
|
|
Hello, please add for foreach possibility to foreach by key like this
{foreach $blocks.header as $k=>$v} |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Jan 14, 2011 2:35 am Post subject: |
|
|
You can just like that in Smarty 3. For Smarty 2:
{foreach from=$foo key="key" item="item"} |
|
Back to top |
|
dobs Smarty Rookie
Joined: 29 Dec 2010 Posts: 25 Location: Kyiv / Ukraine
|
Posted: Fri Jan 14, 2011 8:26 am Post subject: |
|
|
Thanks, it work)
(I have error in my array...) |
|
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
|