In ColdFusion, you declare an array by assigning a variable name to the new array as follows:
<CFSET mynewarray=ArrayNew(x)>
where x is the number of dimensions (from 1 to 3) in the array you want to create. You can visualize a one-dimensional (1D) array as a string of cells, like a single row from a table.
Once created, you can add data to the array, in this case using a form variable:
<CFSET mynewarray[3]=Form.emailaddress>
Data in an array is referenced by index number, in the following manner:
#My1DArray[index1]#<BR>
#My2DArray[index1][index2]#<BR>
#My3DArray[index1][index2][index3]#
|