home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows ArrayDeleteAt --->
- <HTML>
- <HEAD>
- <TITLE>ArrayDeleteAt Example</TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <H3>ArrayDeleteAt Example</H3>
-
- <P>
- <!--- create a new array --->
- <CFSET DaysArray = ArrayNew(1)>
- <!--- populate an element or two --->
- <CFSET DaysArray[1] = "Monday">
- <CFSET DaysArray[2] = "Tuesday">
- <CFSET DaysArray[3] = "Wednesday">
- <!--- delete the second element --->
- <P>Is the second element gone?: <CFOUTPUT>#ArrayDeleteAt(DaysArray,2)#</CFOUTPUT>
- <!--- note that the formerly third element, "Wednesday"
- is now the second element --->
- <P>The second element is now: <CFOUTPUT>#DaysArray[2]#</CFOUTPUT>
-
- </BODY>
- </HTML>
-