ArrayIsEmpty

Description

Determines whether an array is empty of data.

Returns a Boolean TRUE if the array is empty; otherwise FALSE.

Category

Array functions

Syntax

ArrayIsEmpty(array) 

See also

ArrayLen

Parameters

Parameter
Description
array
Name of an array to check for data

Example

<!--- This example shows ArrayIsEmpty --->
<html>
<head>
<title>ArrayIsEmpty Example</title>
</head>

<body>
<H3>ArrayIsEmpty Example</H3>
<!--- create a new array --->
<cfset MyArray = ArrayNew(1)>
<!--- populate an element or two --->
<cfset MyArray[1] = "Test">
<cfset MyArray[2] = "Other Test">
<!--- output the contents of the array --->
<P>Your array contents are:
<cfoutput>#ArrayToList(MyArray)#</cfoutput>
<!--- check if the array is empty --->
<P>Is the array empty?:
<cfoutput>#ArrayIsEmpty(MyArray)#</cfoutput>
<P>Now, clear the array:
<!--- now clear the array --->
<cfset Temp = ArrayClear(MyArray)>
<!--- check if the array is empty --->
<P>Is the array empty?:
<cfoutput>#ArrayIsEmpty(MyArray)#</cfoutput>

</body>
</html>    

LiveDocs comments are not longer enabled for ColdFusion 5.0. Please use one of the following resources instead.

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 5.0