You don't have to do anything to increase x. If you want to find the
current length of Array, just use arraylen(). This code will add a new
array to the end of the existing array:

<cfset array = arrayNew(2)>

<!--- add 3 entries --->
<cfloop index="i" from=1 to=3>
        <cfset array[arrayLen(array)+1] = arrayNew(1)>
        <cfset array[arrayLen(array)][1] = "whatever">
        <cfset array[arrayLen(array)][2] = "whatever part 2 - the
sequel">
        <cfset array[arrayLen(array)][3] = "whatever part 3 - the hunt
for more money">
</cfloop>

CF let's you populate arrays without populating every entity. So you can
(but probably should not) do stuff like:

<cfset x = arrayNew(1)>
<cfset x[99] = "boo">

Now - you mention that you are trying to store information about active
sites. Maybe instead of a 2d array you should consider a struct of
arrays?

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : cfjedimaster

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Kris Pilles [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, August 09, 2002 9:53 AM
> To: CF-Talk
> Subject: Array Help?
> 
> 
> I need some help with 2-dimensional arrays.
> 
> Basically I want to have an array that dynamically adds and removes
> information about my active sites sessions.
> 
> I understans how to get all the data, what I do not 
> understand is how to
> Increacse the X in my array:
> 
> array[x][1]
> Array[x][2]
> Array[x][3]
> 
> Can soemone point me in the right direction...
> 
> 
> THanks 
> 
______________________________________________________________________
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
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