How to dump an array using cfdump in coldfusion

cfdump - dump an array

cfdumpArray.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfdump tag example: how to dump an array</title>
</head>

<body>
<h2 style="color:Crimson">cfdump Tag Example</h2>

<cfset ColorArray=Arraynew(2)>

<cfset ColorArray[1][1]="AliceBlue">
<cfset ColorArray[1][2]="##F0F8FF">

<cfset ColorArray[2][1]="AntiqueWhite">
<cfset ColorArray[2][2]="##FAEBD7">

<cfset ColorArray[3][1]="Aqua">
<cfset ColorArray[3][2]="##00FFFF">

<cfdump var="#ColorArray#" label="ColorArray">
</body>
</html>





More ColdFusion examples