• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

IsArray

Synopsis

                   IsArray(value [, dimension])

Returns true if the value specified is an array. In addition, IsArray( ) can check to see if the array is a specified dimension (1, 2, or 3). Examples:

<cfset Form.MyFormVar = "This is a form variable">
<cfset URL.MyURLVar = "This is a URL variable">
<cfset Grades = ArrayNew(1)>
<cfset Grades[1] = 95>
<cfset Grades[2] = 93>
<cfset Grades[3] = 87>
<cfset Grades[4] = 100>
<cfset Grades[5] = 74>
   
<cfif IsArray(Form.MyFormVar)>
  Form.MyFormVar is an array!
<cfelseif IsArray(URL.MyURLVar)>
  URL.MyURLVar is an array!
<cfelseif IsArray(Grades)>
  Grades is an array!
<cfelse>
  No variables are arrays!
</cfif>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint