I have an array I created by looping over a query.
<cfset arr_counter = 1>
<!--- Initiate Array --->
<cfset order_array = arraynew(2)>
<!--- Loop to create array --->
<cfloop list="#radioList#" index="i" delimiters="|">
<cfset padding = len(i) - len(trim(i))>
<cfset order_array[arr_counter][1] = #i#>
<cfset order_array[arr_counter][2] = #padding#>
<cfset arr_counter = arr_counter + 1>
</cfloop>
At this point I can test arraylen() and get a value '73'. I can loop output
the whole array like this:
<cfloop index="i" from="1" to="#arraylen(order_array)#">
#order_array[i][1]# #order_array[i][2]#
</cfloop>
The data in the array all looks proper, but I want to order it by the [2]
element. I've tried this and get an error:
<cfset order_array = arraysort(order_array, 'numeric', 'desc')>
An error occurred while evaluating the expression:
temp = arraysort(order_array, 'numeric', 'desc')
Error near line 43, column 7.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm