imap_search and multiple criteria

From: Date: Mon, 10 Apr 2006 09:10:23 +0000
Subject: imap_search and multiple criteria
Groups: php.general 
Request: Send a blank email to php-general+get-233660@lists.php.net to get a copy of this message
Does the imap_search support multiple criteria? I've got the following successfully returning the correct results: <?php $search[0] = "BODY \"test\""; $search[1] = "SUBJECT \"test\""; foreach ($search as $criteria) { $search_result[]=$imap_search($mailbox,$criteria,$SE_UID); } ?> However, when you try and put them in the same search e.g. $search = "BODY \"test\" OR SUBJECT \"test\"" It fails... The only way in which I can see this can be done is by joining the various arrays that are returned. Is this best? Thanks Nunners

« previous php.general (#233660) next »