Whatever message this page gives is out now! Go check it out!

ArrayDelete

Last update:
May 18, 2026
Note:
As of ColdFusion (2021 release), CORBA has been removed. You can no longer use CORBA-related features, functions, and tags.

Description

Searches an array for the first position of a specified object and deletes it. The function searches for simple objects such as strings and numbers or for complex objects such as structures. Simple object string searches are case-sensitive. This function does not support searches for COM and CORBA objects.

Returns

True, on successful deletion of the array element.

Category

Function syntax

ArrayDelete(array,value)

History

ColdFusion (2018 release): Made the following changes:
  • Introduced named parameters.
  • Returns the updated array.

See also

Parameters

ParameterDescription
array
Array to search in.
value
Value to search for.

Example

<cfscript>
       myArray=["London", "New York", "Paris", "Barcelona", "Berlin", "Tokyo", "Seattle"];
       WriteOutput("Input array is: ");
       writeDump(myArray)
       // Delete "Paris"
       ArrayDelete(myArray,"Paris"); // Returns True since Paris is a member of myArray
       WriteOutput("Array after deleting Paris is: ");
        writeDump(myArray)
</cfscript>

Output

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page