note 74002 added to function.imap-fetch-overview
| From: | xhack at web dot de | Date: | Tue, 20 Mar 2007 15:05:04 +0000 |
| Subject: | note 74002 added to function.imap-fetch-overview | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124626@lists.php.net to get a copy of this message | ||
you want a sortet list of mails, but you get always the same order? your c-client seems to cause
this. i realized this with linux libc6-2.3.6 and php-5.2.0
try this little code:
# here you try to sort by your criteria
$sort=@imap_sort($mbox,SORTDATE,1,SE_UID);
# here the order of the messages to fetch should be recognised, but it isn't
$tmp=@imap_fetch_overview($mbox,implode(',',$sort),FT_UID);
# so try to work around simply:
for($i=0;$i<count($tmp);$i++)
{ $liste[$i]=$tmp[array_search($tmp[$i]->uid,$sort)]; }
so now you can use the sort by date, address, and so on.
----
Server IP: 217.13.201.10
Probable Submitter: 194.94.196.122
----
Manual Page -- http://www.php.net/manual/en/function.imap-fetch-overview.php
Edit -- https://master.php.net/note/edit/74002
Del: integrated -- https://master.php.net/note/delete/74002/integrated
Del: useless -- https://master.php.net/note/delete/74002/useless
Del: bad code -- https://master.php.net/note/delete/74002/bad+code
Del: spam -- https://master.php.net/note/delete/74002/spam
Del: non-english -- https://master.php.net/note/delete/74002/non-english
Del: in docs -- https://master.php.net/note/delete/74002/in+docs
Del: other reasons-- https://master.php.net/note/delete/74002
Reject -- https://master.php.net/note/reject/74002
Search -- https://master.php.net/manage/user-notes.php