Check our StructSort, it's a native CF function.

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: Thomas Chiverton [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 4:30 AM
> To: CF-Talk
> Subject: Printing a structure in sorted order (repost)
>
>
> Dunno if this made it to the list:
>
> If I have
> r["bob"]=45;
> r["jane"]=2;
> r["fred"]=4;
>
> How can I output
> 45 Bob
> 4 Fred
> 2 Jane
> i.e. sort by value (in perl "foreach $name (sort {$r{$b} <=> $r{$a} } keys
> %r)" does the same thing)
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to