Chapter 9: Handling Complex Data with Structures
111
<CFSET myarray[CurrentRow][1]=test.employee_id[CurrentRow]>
<CFSET myarray[CurrentRow][2]=test.LASTNAME[CurrentRow]>
<CFSET myarray[CurrentRow][3]=test.FIRSTNAME[CurrentRow]>
<CFSET myarray[CurrentRow][4]=test.EMAIL[CurrentRow]>
</CFLOOP>
<!--- Now, create a loop to output the array contents --->
<CFSET Total_Records=Test.RecordCount>
<CFLOOP INDEX="Counter" FROM=1 TO="#Total_Records#">
<CFOUTPUT>
ID: #MyArray[Counter][1]#,
LASTNAME: #MyArray[Counter][2]#,
FIRSTNAME: #MyArray[Counter][3]#,
EMAIL: #MyArray[Counter][4]# <BR>
</CFOUTPUT>
</CFLOOP>
Array Functions
The following functions are available for creating, editing, and handling arrays:
Array Functions
Function
Description
ArrayAppend
Appends an array index to the end of a specified array.
ArrayAvg
Returns the average of the values in the specified array.
ArrayClear
Deletes all data in a specified array.
ArrayDeleteAt
Deletes data from a specified array at the specified index.
ArrayInsertAt
Inserts data in a specified array at the specified index.
ArrayIsEmpty
Returns TRUE if the specified array is empty of data.
ArrayLen
Returns the length of the specified array.
ArrayMax
Returns the largest numeric value in the specified array.
ArrayMin
Returns the smallest numeric value in the specified array.
ArrayNew
Creates a new array of specified dimension.
ArrayPrepend
Adds an array element to the beginning of the specified array.
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...