Share » Forums » General » pb to get the key of an hash table

pb to get the key of an hash table

pb to get the key of an hash table

Friday 24 June 2005 7:41:14 am - 2 replies

Author Message

Paul Borgermans

Friday 24 June 2005 9:20:34 am

Hi F-X

Try this:

{let hasharray=hash('key1','value1','key2','value2')
}
<p> Hash array looping with a var:</p>
{section var=element loop=$hasharray}
key: <b>{$element.key}</b> value: <b>{$element}</b><br />
{/section}
<p> Hash array looping with a name (depreciated)</p>
{section name=element loop=$hasharray}
key: <b>{$element:key}</b> value: <b>{$element:item}</b><br />
{/section}

{/let}

Have a nice weekend

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

François Xavier Lacroix

Monday 27 June 2005 2:28:44 am

so great, my best thanks !

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu