Sorting Objects in an array by object properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

I have an array which holds some objects. Each object represent elements from an email header in a given mailbox. Each object has properties like "from", "sendtime", "subject" etc.

I want to sort the order of the objects in the array by their attribute "sendtime" in order to get a list of email header sorted by their arrival time.

Has anyone an idea how to solve this? I tried various of the array sorting functions but without success.

Thanks in advance

Reto

PS: The array has the following structure:

Array (
[0] => mail_Header Object ( [id] => 1 [pid] => 1 [read] => r [flagged] => n [from] => reto@xxxxxxxxxxx [subject] => Re: [ugffm] TYPO3 anybody ? [sendtime] => 2005.05.17 - 18:27:25 )

[1] => mail_Header Object ( [id] => 2 [pid] => 1 [read] => r [flagged] => n [from] => reto@xxxxxxxxxxx [subject] => Re: [ugffm] website [sendtime] => 2005.05.17 - 19:13:26 )


....
)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux