IsArray(value [, number ])

Description

Returns TRUE if value is an array.

Category

Decision functions, Array functions

Parameters

Parameter
Description
value
Variable or array name
number
Tests whether the array has exactly the specified dimension
Number of elements in value

Example

<!--- This example shows IsArray --->
<html>
<head>
<title>IsArray Example</title>
</head>

<body>
<H3>IsArray Example</H3>

<!--- Make an array --->
<cfset MyNewArray = ArrayNew(1)>
<!--- set some elements --->
<cfset MyNewArray[1] = "element one">
<cfset MyNewArray[2] = "element two">
<cfset MyNewArray[3] = "element three">
<!--- is it an array? --->
<cfoutput>
    <P>Is this an array? #IsArray(MyNewArray)#
    <P>It has #ArrayLen(MyNewArray)# elements.
    <P>Contents: #ArrayToList(MyNewArray)#
</cfoutput>

</body>
</html>