Hi,

ArrayLen(MyArray) gives you the length of the first dimension.
ArrayLen(MyArray[1]) will return the length of the second dimension:

<cfset MyArray = ArrayNew(2)>
<cfset MyArray[1][1] = "1">
<cfset MyArray[1][2] = "1">
<cfset MyArray[1][3] = "1">
<cfset MyArray[2][1] = "1">
<cfset MyArray[2][2] = "1">

<cfoutput>
   #ArrayLen(MyArray)#<br> <!--- returns 2 --->
   #ArrayLen(MyArray[1])#<br> <!--- returns 3 --->
   #ArrayLen(MyArray[2])# <!--- returns 2 --->
</cfoutput>

HTH,

Chris

> -----Urspr�ngliche Nachricht-----
> Von: Rick Lamb [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 25. Januar 2001 20:20
> An: CF-Talk
> Betreff: array length of a dimension?
>
>
>
> I need to find the arraylen of a 2 dimensional array. Can
> somebody recommend
> a technique to do this?
>
> Thanks,
>
> Rick
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to