Description
Determines whether an array element is defined.
Returns
True, if the array element is defined (exists); false, otherwise.
Category
Function syntax
ArrayIsDefined(array, elementIndex) |
See also
History
ColdFusion 8: Added this function.
Parameters
Parameter |
Description |
---|---|
array |
Name of a one-dimensional array, or the array name and indexes into higher-order dimensions of a multidimensional array. |
elementIndex |
Index of the element in a one-dimensional array, or the index of the element in the final dimension of a multidimensional array. |
Usage
The index value of an element must be less than the length of the array.To test the existence of an element in a multidimensional array, specify all but the last dimension of the array in the first parameter. For example, the following line tests the existence of element MyArray241:
ArrayIsDefined(MyArray[2][4], 1) |