Try:
<cfloop from=1 to=#ArrayLen(MyArray)# index=i>
#i#: #MyArray[i]#
</cfloop>
Adrian
http://www.adrianlynch.co.uk/
-----Original Message-----
From: Robert Harrison
Sent: 10 January 2008 15:57
To: CF-Talk
Subject: Stupid Array Question... Part 2
I have a simple array. When I do a dump it gives me the key and one element.
Like:
Key Value
1 34
2 67
3 52
I want to loop over the array and output the key value and element value.
How the heck do I do that.
Sample below:
<cfloop from=1 to=#ArrayLen(MyArray)# index=i>
<cfoutput>#MyArray.mykeyvalue#</cfoutput> what outputs the key value?
<cfoutput>#MyArray.myelementvalue#</cfoutput> what is the name of the
element value?
</cfloop>
Robert B. Harrison
Director of Interactive services
Austin & Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119
F : 631.434.7022
www.austin-williams.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296360
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4