Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Loop through hashmap

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
emmbec
Smarty Rookie


Joined: 01 May 2009
Posts: 10

PostPosted: Thu May 13, 2010 3:46 pm    Post subject: Loop through hashmap Reply with quote

Hi, has anyone looped through a HashMap inside a Smarty template? How can I do it? Using section obviously doesn't work as I expect it to be since it starts looping through the hashmap as if it were an array, thus it doesn't look to the first KEY. What I want to do is first get all of the HashMap values for an specific Key, then continue to the next and so on.

Thanks in advance!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu May 13, 2010 4:51 pm    Post subject: Reply with quote

{foreach} works well with associative arrays.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP