Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

ArrayClear

Synopsis

ArrayClear(array)

Removes all data from the specified array. Upon successful completion, ArrayClear( ) returns a value of true. Here’s an example of clearing all the data from the array Grades:

<cfset Grades = ArrayNew(1)>
<cfset Grades[1] = 95>
<cfset Grades[2] = 93>
<cfset Grades[3] = 87>
<cfset Grades[4] = 100>
<cfset Grades[5] = 74>
   
<cfif ArrayIsEmpty(Grades)>
  The array <b>Grades</b> is empty.
<cfelse>
  The array <b>Grades</b> contains data.
</cfif>
   
<p>Clearing the array...
<cfset ArrayClear(Grades)>
   
<p><cfif ArrayIsEmpty(Grades)>
  The array <b>Grades</b> is empty.
<cfelse>
  The array <b>Grades</b> contains data.
</cfif>


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint