I'm trying to sort an array by a certain column.  The documentation in
either of Forta's books only span about 2 or 3 pages on working with arrays
so I'm wondering if anybody out there can point me to some examples of
working with these.  I am having no problem with all of the other functions,
but no matter how I have been experimenting with sorting - it's not working
right.  Thanks.  Here is what I was thinking should display a number "420" :


<cfset testarray = ArrayNew(2)>

<cfset boom = 0>
<cfset booya = 400>

<cfloop index="boom" from="0" to="20">
    <cfset booya = booya + 1>
    <cfset testarray[ArrayLen(testarray)+1][1]="#boom#">
    <cfset testarray[ArrayLen(testarray)][2]="#booya#">
</cfloop>

<!--- so now I want to sort the second column in descending order --->

<cfset newarray = arraysort(testarray[2], "numeric", "desc")>

<cfoutput>
    #newarray[1][2]#
</cfoutput>

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to