- Introduction
- Creating an Array
- Adding an Element to an Array
- Displaying a Value in an Array
- Looping over an Array
- Manipulating Array Values
- Sorting an Array
- Multidimensional Arrays
- Creating Arrays with More Than Three Dimensions
- Array Aggregate Functions
- Array Utility Functions
- Array Information Functions
3.11. Array Information Functions
You want to retrieve information about an array object.
Technique
Use ColdFusion array information functions to retrieve information about an array object.
<cfset aNewArray = ArrayNew(3)>
Comments
Array Information functions are useful for gathering information about array objects. There are three ColdFusion array information functions, described in detail in Table 3.3.
Table 3.3 ColdFusion Array Utility Functions
Function |
Return Value |
ArrayIsEmpty(array) |
Determines whether the ColdFusion array object array is empty of elements. Returns true if empty. |
ArrayLen(array) |
Returns the number of elements found in array. |
IsArray(array [, dimension]) |
Determines whether array is a ColdFusion array object. If dimension is defined, determines whether the element contained in dimension is a ColdFusion array object. Returns true if the item is an array. |