![]() ![]() ![]() |
ColdFusion supports dynamic multidimensional arrays. When you declare an array with the ArrayNew function, you can specify up to three dimensions. However, if you're feeling particularly adventurous, you can increase an array's dimensions by nesting arrays as array elements:
<CFSET myarray=ArrayNew(1)> <CFSET myotherarray=ArrayNew(2)> <CFSET biggerarray=ArrayNew(3)> <CFSET biggerarray[1][1][1]=myarray> <CFSET biggerarray[1][1][1][10]=some_value> <CFSET biggerarray[2][1][1]=myotherarray> <CFSET biggerarray[2][1][1][4][2]=some_value> <CFSET biggestarray=ArrayNew(3)> <CFSET biggestarray[3][1][1]=biggerarray> <CFSET biggestarray[2][1][1][2][3][1]=some_value>
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.