(PHP 4, PHP 5, PHP 7)
Gets and sort messages
array imap_sort ( resource $imap_stream, int $criteria, int $reverse [, int $options = 0 [, string $search_criteria = NULL [, string $charset = NULL ]]] )
Gets and sorts message numbers by the given parameters.
Parameters:
imap_stream
An IMAP stream returned by imap_open().
criteria
Criteria