array imap_sort ( resource $imap_stream , int $criteria , int $reverse [, int $options = 0 [, string $search_criteria = NULL [, string $charset = NIL ]]] )
Gets and sorts message numbers by the given parameters.
Returns an array of message numbers sorted by the given parameters.