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

IsArray

Last update:
May 18, 2026

Description

Determines whether a value is an array.

Returns

True, if value is an array, or a query column object.

Category

Function syntax

IsArray(object [, number ])

See also

Array functionsModifying a ColdFusion XML object in the Developing ColdFusion Applications

History

ColdFusion (2018 release): Introduced named parameters.
ColdFusion MX:
  • Changed behavior: if the value parameter contains a reference to a query result column, this function now returns True. For example: isArray(MyQuery Column1) returns True. (In earlier releases, it returns False.)
  • Changed behavior: this function can be used on XML objects.

Parameters

Parameter
Description
object
Variable or array name
number
Dimension; function tests whether the array has exactly this dimension

Usage

Use this function to determine whether a value is an array or query column. This function evaluates a Java array object, such as a vector object, as having one dimension.

Example

<cfscript>
    // Make an array
    MyNewArray = ArrayNew(1)
    // set some elements
    MyNewArray[1] = "element one"
    MyNewArray[2] = "element two"
    MyNewArray[3] = "element three"
    // is it an array?
    writeOutput(IsArray(MyNewArray)) // Returns True
</cfscript>
Output
YES

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