loop through an array coldfusion code example
Example 1: coldfusion loop structure
<cfscript>
for ( key in myStruct ) {
writeOutput( '#key#: #myStruct[key]#<br>' );
}
</cfscript>
Example 2: coldfusion loop array
<cfscript>
for ( item in myArray ) {
writeOutput( #item# & '<br>' );
}
</cfscript>
Example 3: coldfusion loop array
<cfset myList = 'Jeff,John,Steve,Julliane'>
<cfloop list="#myList#" index="item">
#item#<br>
</cfloop>