> Do you have to use CFSET with ea element in the array ie
>
> <CFSET arrayelement[1][1] = "Bob">
> <CFSET arrayelement[1][2] = "Joe">
> <CFSET arrayelement[1][3] = "Rob">
> <CFSET arrayelement[1][4] = "Moe">
> <CFSET arrayelement[2][1] = "Deb">
> <CFSET arrayelement[2][2] = "Meg">
> <CFSET arrayelement[2][3] = "Peg">
> <CFSET arrayelement[2][4] = "Amy">
>
> Or is there a way to loop it? ie the C construct
> arrayelement[] = "Bob,Joe,Rob,Moe,etc.."
The obvious answer is to loop it, as long as you know exactly where the
items are meant to go...
<cfset i=0>
<cfset j=1>
<cfloop index="k" list="Bob,Joe,Rob,Moe,Deb,Meg,Peg,Amy">
<cfset i=i+1>
<cfif i is 5>
<cfset j=j+1>
<cfset i=1>
</cfif>
<cfset arrayElement[j][i]=k>
</cfloop>
Or, for speed,
<cfset arrayElement[1]=ListToArray("Bob,Joe,Rob,Moe")>
<cfset arrayElement[2]=ListToArray("Deb,Meg,Peg,Amy")>
They'll give you the same effect as your array example.
Although the first is more flexible is you have a huge list, and want to
break it into multiple dimensions.
HTH
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.