Re: [PHP] Sort an array of objects

2003-10-01 Thread Marek Kilimajer
Matt Palermo wrote: I have an array of object for files on my site. The objects hold a file's name, size, extension, etc... I was wondering if anyone knows where I could find a relatively easy function for sorting the array of these objects by either name, size, etc... Please let me know if got

[PHP] Sort an array of objects

2003-10-01 Thread Matt Palermo
I have an array of object for files on my site. The objects hold a file's name, size, extension, etc... I was wondering if anyone knows where I could find a relatively easy function for sorting the array of these objects by either name, size, etc... Please let me know if got any tips. Thanks a

Re: [PHP] Sort an array by its values

2001-07-08 Thread Justin Farnsworth
Try something like: uasort($your_hash[$first_level][$any_second_level], create_function('$a,$b', 'return $a["what_level"] - $b["what_level"];')); and adjust this according to the level and what you want to sort on accordingly... _jef Aaron Bennett wrote: > > Hi

RE: [PHP] Sort an array by its values

2001-07-08 Thread Aaron Bennett
help, i think i got it from here. -- Aaron -Original Message- From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:38 AM To: Aaron Bennett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sort an array by its values Can you print_r($variable) and post it here?

RE: [PHP] Sort an array by its values

2001-07-08 Thread Andrew Braund
-Original Message- > From: Aaron Bennett [mailto:[EMAIL PROTECTED]] > Sent: Sunday, 8 July 2001 17:56 > To: Php-General (E-mail) > Subject: [PHP] Sort an array by its values > > > Hi All, > I'm trying to sort an array of objects by the value of one of those > obj

Re: [PHP] Sort an array by its values

2001-07-08 Thread Chris Lambert - WhiteCrown Networks
wn Networks' <[EMAIL PROTECTED]>; Aaron Bennett <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 4:34 AM Subject: RE: [PHP] Sort an array by its values | Chris, | I'm looking at ksort as i type... the problem i'm having is that i'm | trying t

RE: [PHP] Sort an array by its values

2001-07-08 Thread Aaron Bennett
ROTECTED]] Sent: Sunday, July 08, 2001 1:33 AM To: Aaron Bennett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sort an array by its values Do you mean something like www.php.net/ksort or www.php.net/krsort? I'm not sure of the actual structure of your array, though, so those might not work as expecte

Re: [PHP] Sort an array by its values

2001-07-08 Thread Chris Lambert - WhiteCrown Networks
n.net */ - Original Message - From: Aaron Bennett <[EMAIL PROTECTED]> To: Php-General (E-mail) <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 4:25 AM Subject: [PHP] Sort an array by its values | Hi All, | I'm trying to sort an array of objects by the value of one of th

[PHP] Sort an array by its values

2001-07-08 Thread Aaron Bennett
Hi All, I'm trying to sort an array of objects by the value of one of those objects... for instance, I'll have an object with 2 properties, "id" and "score", where id is unique and score is its relevant (and sometimes simelar) score. i've tried using sort() and asort() but i can't figure how to

Re: [PHP] Sort an array

2001-05-02 Thread Geir Eivind Mork
On Monday 30 April 2001 21:19, Brandon Orther wrote: > Is there a way to sort an array alphabetically? two examples sort -- Sort an array natsort -- Sort an array using a "natural order" algorithm -- php developer / CoreTrek AS| Somehow I reached excess without ever Sandnes / Rogal

Re: [PHP] Sort an array

2001-04-30 Thread Miles Thompson
The PHP online manual is very easy to use. Start at http://www.php.net/array and you'll find all the functions that act on array downl the left side of your browser, including a fantastically rich set of sort options. Miles At 12:19 PM 4/30/01 -0700, Brandon Orther wrote: >Hello, > >Is there

[PHP] Sort an array

2001-04-30 Thread Brandon Orther
Hello, Is there a way to sort an array alphabetically? Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]