> Can ArraySort be used on a two dimensional array. If so what
> would a typical example look like?
You can use ArraySort on two-dimensional arrays, because in CF, a
two-dimensional arrays is actually a one-dimensional array in which the
members are themselves one-dimensional arrays. So, the two code snippets
below are functionally identical:
<!--- sample one --->
<CFSET aFamousFatGuys = ArrayNew(2)>
<CFSET aFamousFatGuys[1][1] = "John">
<CFSET aFamousFatGuys[1][2] = "Goodman">
<CFSET aFamousFatGuys[2][1] = "Fatty">
<CFSET aFamousFatGuys[2][2] = "Arbuckle">
<!--- sample two --->
<CFSET aFamousFatGuys = ArrayNew(1)>
<CFSET aFamousFatGuys[1] = ArrayNew(1)>
<CFSET aFamousFatGuys[1][1] = "John">
<CFSET aFamousFatGuys[1][2] = "Goodman">
<CFSET aFamousFatGuys[2] = ArrayNew(1)>
<CFSET aFamousFatGuys[2][1] = "Fatty">
<CFSET aFamousFatGuys[2][2] = "Arbuckle">
Now the first, or outer, array doesn't seem to expose anything that is
sortable - it's only got other arrays as members. If you did try to sort
aFamousFatGuys, you'd get an error. The members of the outer array are
themselves arrays, and those arrays contain sortable values, so you could
sort aFamousFatGuys[1] or aFamousFatGuys[2].
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
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.