How to use arguments scope as an array in ColdFusion

cfargument - arguments scope as an array

cfargumentScopeAsArray.cfm


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfargument tag: how to use the arguments scope as an array in coldfusion</title>
</head>

<body>
<h2 style="color:DodgerBlue; font-style:italic">cfargument tag example: using the arguments scope as an array</h2>
<hr width="600" align="left" color="OrangeRed" />
<br />

<cffunction name="GetCenter" access="remote" returntype="query">
 <cfargument name="Center_ID" type="numeric">
    <cfquery name="qCenter" datasource="cfdocexamples">
     SELECT Center_ID, Name, Address1 FROM CENTERS
        WHERE Center_ID= #arguments[1]#
    </cfquery>
    <cfreturn qCenter>
</cffunction>

<cfdump var="#GetCenter(3)#" label="CenterDetails">

</body>
</html>





More ColdFusion examples