Determines whether an array is empty of data elements.
True, if the array is empty; False, otherwise.
ArrayIsEmpty(array) |
ArrayIsDefined, arrayLen, Functions for XML object management in Modifying a ColdFusion XML object in the Developing ColdFusion Applications
ColdFusion MX: Changed behavior: this function can be used on XML objects.
Parameter |
Description |
|---|---|
array |
Name of an array |
You can test whether an element of a higher level dimension of a multidimensional array is empty by specifying the element in the ArrayIsEmpty function. To test whether the first row of the two-dimensional array MyArray is empty, use the following function:
ArrayIsEmpty(MyArray2[1]) |

<cfscript>
someArray = [1,2,3,4,5];
writeOutput(arrayIsEmpty(someArray)); // Returns False
</cfscript>
Sign in to your account