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

  1. <!--- This example shows ArrayDeleteAt --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>ArrayDeleteAt Example</TITLE>
  5. </HEAD>
  6.  
  7. <BODY>
  8. <H3>ArrayDeleteAt Example</H3>
  9.  
  10. <P>
  11. <!--- create a new array --->
  12. <CFSET DaysArray = ArrayNew(1)>
  13. <!--- populate an element or two --->
  14. <CFSET DaysArray[1] = "Monday">
  15. <CFSET DaysArray[2] = "Tuesday">
  16. <CFSET DaysArray[3] = "Wednesday">
  17. <!--- delete the second element --->
  18. <P>Is the second element gone?: <CFOUTPUT>#ArrayDeleteAt(DaysArray,2)#</CFOUTPUT>
  19. <!--- note that the formerly third element, "Wednesday"
  20. is now the second element --->
  21. <P>The second element is now: <CFOUTPUT>#DaysArray[2]#</CFOUTPUT>
  22.  
  23. </BODY>
  24. </HTML>       
  25.