View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > IsArray PreviousNext

IsArray

Determines whether a value is an array.

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

Array functions, Decision functions

IsArray(value [, number ])

Array functions

ColdFusion MX:

Parameter

Description

value

Variable or array name

number

Dimension; function tests whether the array has exactly this dimension

This function evaluates a Java array object, such as vector object, as having one dimension.

<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>

Contents > CFML Reference > ColdFusion Functions > IsArray PreviousNext

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


ChronoCrypt said on Sep 9, 2004 at 1:00 PM :
Caution: A file which was taken via cffile readbinary is also an array of numerics, isArray( binaryObject ) returns true...

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct122.htm