Arrayclear - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

ArrayClear

Description
Deletes the data in an array.
Returns
True, on successful completion.
Category
Array functions
Function syntax
ArrayClear(array)
See also
ArrayDeleteAt
History
ColdFusion MX: Changed behavior: this function can be used on XML objects.
Parameters
Parameter
array
Example
<h3>ArrayClear 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>
Description
Name of an array
ArrayClear
379

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents