Description

Determines the number of elements in an array.

Returns

The number of elements in an array.

Category

Array functions

Function syntax

ArrayLen(array)

See also

ArrayIsEmpty; Functions for XML object management in Modifying a ColdFusion XML object in the Developing ColdFusion Applications

History

ColdFusion MX: Changed behavior: This function can be used on child XML objects.

Parameters

Parameter

Description

array

Name of an array

Example

<cfscript>
	myArray=[1,2,3,4,5]
	writeoutput(ArrayLen(myArray)) // Returns 5
</cfscript>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy