Link to home
Start Free TrialLog in
Avatar of mjacobs2929
mjacobs2929

asked on

Coldfusion ArrayPrepend Question


How can I use ArrayPrepend() to add an element to a 2d array?

<!--- Set Route-Airport-Country Array --->
<cfset countToo=js_route_airport_country.recordCount>
<cfloop index="i" from="1" to="#countToo#">
 <cfset airportArray[i][1]='#js_route_airport_country.country_desc[i]#'>
 <cfset airportArray[i][2]='#js_route_airport_country.airport_desc[i]#'>
 <cfset airportArray[i][3]='a#js_route_airport_country.airport_code[i]#'>
 <cfset airportArray[i][4]='#DateFormat(js_route_airport_country.start_date[i], "yyyymm")#'>
 <cfset airportArray[i][5]='#DateFormat(js_route_airport_country.end_date[i], "yyyymm")#'>
</cfloop>
   <cfdump var="#airportArray#">


Many thanks,
Michelle
ASKER CERTIFIED SOLUTION
Avatar of reggi635
reggi635

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial