| Contents > CFML Reference > ColdFusion Functions > ArrayAppend |
|
|
|
|
||
Appends an array element to an array.
True, on successful completion.
ArrayAppend(array, value)
ColdFusion MX: Changed behavior: this function can be used on XML objects.
Parameter |
Description |
|---|---|
array |
Name of an array |
value |
Value to add at end of array |
<h3>ArrayAppend Example</h3> <cfquery name = "GetEmployeeNames" datasource = "cfsnippets"> SELECT FirstName, LastName FROM Employees </cfquery> <!--- create an array ---> <cfset myArray = ArrayNew(1)> <!--- set element one to show where we are ---> <cfset myArray[1] = "Test Value"> <!--- loop through the query; append these names successively to the last
element ---> <cfloop query = "GetEmployeeNames"> <cfoutput>#ArrayAppend(myArray, "#FirstName# #LastName#")# </cfoutput>, Array was appended<br> </cfloop> <!--- show the resulting array as a list ---> <cfset myList = ArrayToList(myArray, ",")> <!--- output the array as a list ---> <cfoutput> <p>The contents of the array are as follows: <p>#myList# </cfoutput>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > ArrayAppend |
|
|
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.
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/functia3.htm
Comments
No screen name said on Oct 7, 2004 at 11:52 AM :