home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / arrayisempty.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  774 b   |  29 lines

  1. <!--- This example shows ArrayIsEmpty --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>ArrayIsEmpty Example</TITLE>
  5. </HEAD>
  6.  
  7. <BODY>
  8. <H3>ArrayIsEmpty Example</H3>
  9. <!--- create a new array --->
  10. <CFSET MyArray = ArrayNew(1)>
  11. <!--- populate an element or two --->
  12. <CFSET MyArray[1] = "Test">
  13. <CFSET MyArray[2] = "Other Test">
  14. <!--- output the contents of the array --->
  15. <P>Your array contents are:
  16. <CFOUTPUT>#ArrayToList(MyArray)#</CFOUTPUT>
  17. <!--- check if the array is empty --->
  18. <P>Is the array empty?:
  19. <CFOUTPUT>#ArrayIsEmpty(MyArray)#</CFOUTPUT>
  20. <P>Now, clear the array:
  21. <!--- now clear the array --->
  22. <CFSET Temp = ArrayClear(MyArray)>
  23. <!--- check if the array is empty --->
  24. <P>Is the array empty?:
  25. <CFOUTPUT>#ArrayIsEmpty(MyArray)#</CFOUTPUT>
  26.  
  27. </BODY>
  28. </HTML>       
  29.