You can have a structure of structures, a structure of arrays, arrays of 
structures. However complex you want.

Cheers



>From: "Chris Edwards" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: Re: non-integer array indexes??
>Date: Mon, 22 Jul 2002 09:43:57 -0400
>
> > Does it have to be an Array, why not use a structure?
>
>Its 2 dimensional.  Structs are one dim.  Right?
>
>
> >
> > Can there be non-integer array indexes?
> >
> > I've tried a workaround...
> >
> > <cfset fields=ArrayNew(2)>
> > <cfset ArtistID=1>
> > <cfset ArtistEmail=2>
> > <cfset ArtistFirstName=3>
> >
> > <cfset label=1>
> > <cfset max_length=2>
> > <cfset min_length=3>
> > <cfset required=4>
> > <cfset size=5>
> >
> > <cfset fields[ArtistID][label] = "ID">
> > <cfset fields[ArtistID][max_length] = "10">
> > <cfset fields[ArtistID][min_length] = "10">
> > <cfset fields[ArtistID][required] = "true">
> > <cfset fields[ArtistID][size] = "10">
> >
> > <cfset fields[ArtistEmail][label] = "Email">
> > <cfset fields[ArtistEmail][max_length] = "10">
> > <cfset fields[ArtistEmail][min_length] = "10">
> > <cfset fields[ArtistEmail][required] = "true">
> > <cfset fields[ArtistEmail][size] = "10">
> >
> > <cfset fields[ArtistFirstName][label] = "Firstname">
> > <cfset fields[ArtistFirstName][max_length] = "10">
> > <cfset fields[ArtistFirstName][min_length] = "10">
> > <cfset fields[ArtistFirstName][required] = "true">
> > <cfset fields[ArtistFirstName][size] = "10">
> >
> > <cfset test=ArrayNew(1)>
> > <cfset test[1] = "ArtistID">
> > <cfset test[2] = "ArtistEmail">
> > <cfset test[3] = "ArtistFirstName">
> >
> > <cfloop index="i" from=1 to=3>
> >   <cfoutput>
> >     #fields[#test[i]#][label]#<br>
> >   </cfoutput>
> > </cfloop>
> >
> > Which chokes...
> >
> > Anyone have any suggestions?



______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to