Whatever message this page gives is out now! Go check it out!
ArrayIsDefined(array, index) |
| Parameter | Description |
array | Name of a one-dimensional array, or the array name and indexes into higher-order dimensions of a multidimensional array. |
index | Index of the element in a one-dimensional array, or the index of the element in the final dimension of a multidimensional array. |
<cfscript>
myCities=["London","New York","Paris","Tokyo","Barcelona"];
WriteOutput(ArrayIsDefined(myCities,4) & " | "); //returns True since index 4 exists in the array
WriteOutput(ArrayIsDefined(myCities,6)); //returns False since index 6 does not exist in the array
</cfscript>