arrayDelete
Description
Deletes an element from an array. It does not support COM and CORBA objects.
Categories
Syntax
ArrayDelete(array,object)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| array | Name of the array | ||
| object | Object to be deleted |
Returns
Yes, on successful deletion of
the array element.
Example
<cfset MyNewArray=ArrayNew(1)> <cfloop index="i" from="1" to="20" step="1"> <cfset MyNewArray[i] = i*5> </cfloop> <cfloop index="i" from="1" to="20" step="1"> <cfoutput># MyNewArray[i] # ,</cfoutput> </cfloop> <cfoutput> <br /> Checkvalue 25:#ArrayContains(MyNewArray,"25")#<br /> Delete value 25:#ArrayDelete(MyNewArray,"25")#<br /> Checkvalue 25:#ArrayContains(MyNewArray,"25")#<br /> </cfoutput>