IMAP_SORT(3) 1 IMAP_SORT(3)
imap_sort - Gets and sort messages
SYNOPSIS
array imap_sort NULL (resource $imap_stream, int $criteria, int $reverse, [int $options], [string $search_criteria], [string $charset
= NIL])
DESCRIPTION
Gets and sorts message numbers by the given parameters.
PARAMETERS
o $
imap_stream -An IMAP stream returned by imap_open(3).
o $criteria
- Criteria can be one (and only one) of the following:
o SORTDATE - message Date
o SORTARRIVAL - arrival date
o SORTFROM - mailbox in first From address
o SORTSUBJECT - message subject
o SORTTO - mailbox in first To address
o SORTCC - mailbox in first cc address
o SORTSIZE - size of message in octets
o $reverse
- Set this to 1 for reverse sorting
o $options
- The $options are a bitmask of one or more of the following:
o SE_UID - Return UIDs instead of sequence numbers
o SE_NOPREFETCH - Don't prefetch searched messages
o $search_criteria
-
o $charset
-
RETURN VALUES
Returns an array of message numbers sorted by the given parameters.
PHP Documentation Group IMAP_SORT(3)