Re: Sorting Arrays
| From: | Luke Ehresman | Date: | Thu, 28 Dec 2000 17:53:01 +0000 |
| Subject: | Re: Sorting Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32114@lists.php.net to get a copy of this message | ||
Hi David,
I'm a developer for SquirrelMail (http://www.squirrelmail.org), and we
ran into the same type of problem when needing to sort headers. You
might try downloading our latest source (found on the web site) and look
at how we implemented this. Check out:
functions/array.php
functions/message_list.php
(in function showMessagesForMailbox()
around line 225 in version 1.0pre1)
Hope that helps,
Luke
> I have an array. I would like to sort it on the minutes field I read
> the docs but most was for 1D stuff not multiple dimensions. Any help
> would be appreciated.
> -Dave
>
>
> Array
> (
> [0] => Array
> (
> [username] => petion
> [nas] => pm3-0
> [port] => S1
> [timeon] => Thu 11:05
> [minutes] => 46
> )
>
> [1] => Array
> (
> [username] => cnrealtor
> [nas] => pm3-0
> [port] => S2
> [timeon] => Thu 11:09
> [minutes] => 42
> )
>
> [2] => Array
> (
> [username] => lrich
> [nas] => pm3-0
> [port] => S4
> [timeon] => Thu 11:45
> [minutes] => 6
> )
>
> [3] => Array
> (
> [username] => bobsvi
> [nas] => pm3-0
> [port] => S3
> [timeon] => Thu 10:55
> [minutes] => 56
> )
>
> [4] => Array
> (
> [username] => wick
> [nas] => pm3-0
> [port] => S6
> [timeon] => Thu 11:46
> [minutes] => 5
> )
>
> [5] => Array
> (
> [username] => bmcycles
> [nas] => pm3-0
> [port] => S7
> [timeon] => Thu 11:46
> [minutes] => 5
> )
> }
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net