RE: [PHP] sorting multi-dimensional array

2003-02-20 Thread Ford, Mike [LSS]
-Original Message- From: Steve Buehler [mailto:[EMAIL PROTECTED]] Sent: 20 February 2003 05:25 Ahhhfinally did it with usort. Thanks to those who gave me that answer. Now here is a question for that. I would like to re-use my cmp function without having to rewrite it

RE: [PHP] sorting multi-dimensional array

2003-02-20 Thread Steve Buehler
This would work (and might still if I changed things), but the part that calls it is in another function also. Steve At 02:35 PM 2/20/2003 +, you wrote: -Original Message- From: Steve Buehler [mailto:[EMAIL PROTECTED]] Sent: 20 February 2003 05:25 Ahhhfinally did it with

Re: [PHP] sorting multi-dimensional array

2003-02-19 Thread Steve Buehler
Ahhhfinally did it with usort. Thanks to those who gave me that answer. Now here is a question for that. I would like to re-use my cmp function without having to rewrite it each time. Can it be written so that instead of divname being hard coded, that I can pass the sort field in the

Re: [PHP] sorting multi-dimensional array

2003-02-13 Thread Jonathan Pitcher
Steve, Have you tired Usort ?? http://www.php.net/manual/en/function.usort.php On Thursday, February 13, 2003, at 01:08 PM, Steve Buehler wrote: PHP version 4.2.2 I sure hope that I can get somebody to help me figure this one out. I have a multi-dimensional array that I need to sort.

RE: [PHP] sorting multi-dimensional array where array elements are structs [simple class]

2003-02-12 Thread Erin Fry
again. -Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 7:19 PM To: [EMAIL PROTECTED] Cc: Erin Fry Subject: Re: [PHP] sorting multi-dimensional array where array elements are structs [simple class] On Tue, 11 Feb 2003 08:27:57 -0600, you

RE: [PHP] sorting multi-dimensional array where array elements are structs [simple class]

2003-02-11 Thread Erin Fry
On Mon, 10 Feb 2003 16:23:10 -0600, you wrote: Hi. I’m working with a multidimensional array where the data in the array is a class (struct). All the information is being stored correctly, but I need to sort each “column” (AA0, BA0, etc. – see below) by the fieldNo portion of the struct.

Re: [PHP] sorting multi-dimensional array where array elements are structs [simple class]

2003-02-11 Thread Michael Sims
On Tue, 11 Feb 2003 08:27:57 -0600, you wrote: Thanks for the reply. I had already tried usort previously. For some reason, there is no data for the array fields at all in the cmp function - not sure why. Does anyone know? All help is appreciated! Thanks. Can you post a short code sample

Re: [PHP] sorting multi-dimensional array where array elements are structs [simple class]

2003-02-10 Thread Michael Sims
On Mon, 10 Feb 2003 16:23:10 -0600, you wrote: Hi. I’m working with a multidimensional array where the data in the array is a class (struct). All the information is being stored correctly, but I need to sort each “column” (AA0, BA0, etc. – see below) by the fieldNo portion of the struct.