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

Name

ArrayToList

Synopsis

ArrayToList(array [, delimiter])

Converts the specified one-dimensional array to a ColdFusion list. An optional delimiter may be specified (a comma is the default delimiter). The following example converts an array to a comma-delimited list:

<cfset Grades = ArrayNew(1)>
<cfset Grades[1] = 95>
<cfset Grades[2] = 93>
<cfset Grades[3] = 87>
<cfset Grades[4] = 100>
<cfset Grades[5] = 74>
   
<b>Original Array</b><br>
<cfdump var="#Grades#">
   
<p>Convert Array to List...
<cfset GradeList = ArrayToList(Grades)>
   
<p><b>New List</b><br>
<cfoutput>GradeList = #GradeList#</cfoutput>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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