Whatever message this page gives is out now! Go check it out!

ArrayIsEmpty

Last update:
May 18, 2026

Description

Determines whether an array is empty of data elements.

Returns

True, if the array is empty; False, otherwise.

Category

Function syntax

ArrayIsEmpty(array)

See also

ArrayIsDefined arrayLenFunctions for XML object management in  Modifying a ColdFusion XML object  in the Developing ColdFusion Applications

History

ColdFusion MX: Changed behavior: this function can be used on XML objects.

Parameters

ParameterDescription
array
Name of an array

Usage

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])

Example

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

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page