260
CFML Language Reference
ArrayIsEmpty
Determines whether the specified array is empty of data.
Returns a Boolean TRUE if specified array is empty, FALSE if not empty.
See also
ArrayLen
.
Syntax
ArrayIsEmpty
(
array)
array
Name of the array you want 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>
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...