there's really no good way to sort a multidimensional array for one reason.
CF represents a N dimensional array (internally) as an array of arrays.
there's no "scalar" (sortable) value posessed by an array "object", so one
cannot sort by it.  perhaps if you told us what you're trying to do, we can
help you out.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Craig Bowes [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 03, 2000 4:35 PM
To: CF-Talk
Subject: sorting arrays


This is a multi-part message in MIME format.

------=_NextPart_000_002D_01C045AB.91D3E0C0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I've created a 2 dimensional array and wish to sort it by one of the =
"columns" in that array.  I've tried arraysort() function but that =
doesn't keep the data together.  It sorts only 1 dimension of the array =
and leaves the rest alone.  Is there any way to sort an array in the =
same way you use a sql ORDER BY clause where all the "rows" in the array =
remain intact but change order?   Or is there a way to do this using =
programmatically created queries?

-Craig Bowes
Coldfusion Programmer
[EMAIL PROTECTED]
972.243.1171

------=_NextPart_000_002D_01C045AB.91D3E0C0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I've created a 2 dimensional array and =
wish to sort=20
it by one of the "columns" in that array.&nbsp; I've tried arraysort() =
function=20
but that doesn't keep the data together.&nbsp; It sorts only 1 dimension =
of the=20
array and leaves the rest alone.&nbsp; Is there any way to sort an array =
in the=20
same way you use a sql ORDER BY clause where all the "rows" in the array =
remain=20
intact but change order?&nbsp;&nbsp; Or is there a way to do this using=20
programmatically created queries?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>-Craig Bowes<BR>Coldfusion =
Programmer<BR><A=20
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A><BR>972.243.1171</FONT=
></DIV></BODY></HTML>

------=_NextPart_000_002D_01C045AB.91D3E0C0--

----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to