<cfloop from="1" to="#ArrayLen(MyArray)#" index="i">
<cfoutput>#i# = #MyArray[i]#</cfoutput>
</cfloop>

On Jan 10, 2008 10:57 AM, Robert Harrison <[EMAIL PROTECTED]>
wrote:

> 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>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:296359
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to