home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / isarray.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  616 b   |  26 lines

  1. <!--- This example shows IsArray --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>IsArray Example</TITLE>
  5. </HEAD>
  6.  
  7. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  8. <BODY  bgcolor="#FFFFD5">
  9. <H3>IsArray Example</H3>
  10.  
  11. <!--- Make an array --->
  12. <CFSET MyNewArray = ArrayNew(1)>
  13. <!--- set some elements --->
  14. <CFSET MyNewArray[1] = "element one">
  15. <CFSET MyNewArray[2] = "element two">
  16. <CFSET MyNewArray[3] = "element three">
  17. <!--- is it an array? --->
  18. <CFOUTPUT>
  19.     <P>Is this an array? #IsArray(MyNewArray)#
  20.     <P>It has #ArrayLen(MyNewArray)# elements.
  21.     <P>Contents: #ArrayToList(MyNewArray)#
  22. </CFOUTPUT>
  23.  
  24. </BODY>
  25. </HTML>       
  26.