use a jagged two dim array?

Arrays = ArrayNew(1)
<cfloop... i
        <cfset AryName[i] = ArrayNew(1)>
        <cfloop... j
                <cfset AryName[i][j] = Somedata.field[j]>
        </cfloop>
</cfloop>

-----Original Message-----
From: Brrrian [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 23 July 2003 9:24 AM
To: CF-Talk
Subject: RE: dynamic naming???


Thanks Matthew,
Unfortunately both of those ideas get:Invalid CFML construct found on line 
156 at column
;(

At 10:48 AM 7/23/03 +1200, you wrote:

>Have you tried
><cfset "AryName#j#"[i] = Somedata.field[j]>
>
>If that don't work how about
>
><cfset variables["AryName#j#"][i] = Somedata.field[j]>
>
>
> > -----Original Message-----
> > From: Brrrian [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, 23 July 2003 9:47 a.m.
> > To: CF-Talk
> > Subject: dynamic naming???
> >
> > trying to dynamically populate several 1 dimension arrays...
> >
> > AryName1
> > AryName2
> > AryName3
> > AryNameN...
> >
> > I create the N...Arrays with ArrayNew(1) and then try a loop to populate
> >
> > <cfloop...
> > <cfset AryName#j#[i] = Somedata.field[j]>
> > </cfloop>
> >
> > Gets:Invalid CFML construct found on line 156 at column 49.
> >
> > or
> >
> > <cfloop...
> > <cfset "AryName#j#[i]" = Somedata.field[j]>
> > </cfloop>
> >
> > Gets:The string "NewColNum1[i]" is not a valid ColdFusion variable name.
> >
> > or
> >
> > <cfloop...
> > <cfset theAryName = "NewColNum"&#j#>
> > <cfset theAryName = Somedata.field[j]>
> > </cfloop>
> >
> > Gets:You have attempted to dereference a scalar variable of type class
> > java.lang.String as a structure with members.
> >
> >
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to