CF Array Function ArrayAppend()
Usage: ArrayAppend(array, value)
<cfoutput>
<cfparam name="DefaultValue" default="Append Me">
<cfset ExampleArray = ArrayNew(1)>
<cfset ExampleArray[1] = "Element One">
<cfset ExampleArray[2] = "Element Two">
<cfif isdefined('Form.run')>
<h2>Results</h2>
#ArrayAppend(ExampleArray,DeafaultValue)#<br>
<cfloop from="1" to="#ArrayLen(ExampleArray)#" index="index">
#ExampleArray[index]#<br>
</cfloop>
<br>
<a href="#getfilefrompath(getcurrenttemplatepath())#">try again?</a>
<cfelse>
<h2>ArrayAppend(array, value) Example</h2>
ExampleArray currently contains these elements:<br>
<cfloop from="1" to="#ArrayLen(ExampleArray)#" index="index">
#ExampleArray[index]#<br>
</cfloop>
<br><br>
Append the following Element to the Example Array:<br>
<form action="#getfilefrompath(getcurrenttemplatepath())#" method="Post">
<input type="text" name="DeafaultValue" value="#DefaultValue#">
<input type="submit" name="run" value="Run Example">
</form>
</cfif>
</cfoutput>
Emir Plicanic owns and operates a web design company (