As of ColdFusion (2021 release), CORBA has been removed. You can no longer use CORBA-related features, functions, and tags.
Searches an array for the presence of a specified object. 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.
Yes, if the specified object exists in the array.
ColdFusion (2018 release): Changed parameter name elementToBeSearched to value.
ArrayContains(array,value)
Parameter |
Description |
---|---|
array |
Array to search in. |
value |
Object to search for. |
<cfscript> myArray=[1,2,3,4,5]; writeoutput(ArrayContains(myArray,3) & " | "); //returns True since 3 is a member of myArray writeoutput(ArrayContains(myArray,6)); //returns False since 6 is not a member of myArray </cfscript>
YES | NO
Fazer logon em sua conta