Array Functions - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 9: Handling Complex Data with Structures
<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>
</CFOUTPUT>
</CFLOOP>

Array Functions

The following functions are available for creating, editing, and handling arrays:

Array Functions

Function
ArrayAppend
ArrayAvg
ArrayClear
ArrayDeleteAt
ArrayInsertAt
ArrayIsEmpty
ArrayLen
ArrayMax
ArrayMin
ArrayNew
ArrayPrepend
ID: #MyArray[Counter][1]#,
LASTNAME: #MyArray[Counter][2]#,
FIRSTNAME: #MyArray[Counter][3]#,
EMAIL: #MyArray[Counter][4]# <BR>
Description
Appends an array index to the end of a specified array.
Returns the average of the values in the specified array.
Deletes all data in a specified array.
Deletes data from a specified array at the specified index.
Inserts data in a specified array at the specified index.
Returns TRUE if the specified array is empty of data.
Returns the length of the specified array.
Returns the largest numeric value in the specified array.
Returns the smallest numeric value in the specified array.
Creates a new array of specified dimension.
Adds an array element to the beginning of the specified array.
111

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents