<cfloop from=1 to=#ArrayLen(MyArray)# index=i>
  <cfoutput>#i#</cfoutput>     //outputs the key value
  <cfoutput>#MyArray[i]#</cfoutput>  //outputs the element value
</cfloop>


On Jan 10, 2008 9: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>
>
>
>
>
> 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
>
> Great advertising can't be either/or... It must be &.
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:296358
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