<cfset map = StructNew()>
<cfset map["a"] = 1>
<cfset map["b"] = 2>

<cfoutput>

<cfloop collection="#map#" item="i">
        <a href="#i#">#map[i]#</a><br />
</cfloop>

</cfoutput>

Give that a blast.

Adrian

-----Original Message-----
From: Oleg Gunkin [mailto:[EMAIL PROTECTED]
Sent: 02 February 2006 17:56
To: CF-Talk
Subject: Coldfusion hash-map


Could anyone translate this pseudo code to coldfusion for me please?


HashMap map = new HashMap();

map["a"] = 1;
map["b"] = 2;

for each key in map {
        print '<a href="' + key + '">' + map[key] + '</a>';
}

Thank you.

PS: I am asking that because I am really new in CF, and my boss leaves me no
time for the proper research. I would really appreciate any help.

--
Oleg Gunkin
Email: [EMAIL PROTECTED]
Phone: (604) 666-9392
Emerging Technologies / Pacific Web Services
Information Technology Services
Public Works and Government Services Canada (Pacific)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231153
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to