svn: /phpdoc/en/trunk/reference/imap/functions/ imap-search.xml

From: Date: Wed, 15 Jun 2011 19:59:00 +0000
Subject: svn: /phpdoc/en/trunk/reference/imap/functions/ imap-search.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-8277@lists.php.net to get a copy of this message
philip Wed, 15 Jun 2011 19:59:00 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=312195 Log: Added an imap_search() example, and mentioned that all criteria entries are matched. Changed paths: U phpdoc/en/trunk/reference/imap/functions/imap-search.xml Modified: phpdoc/en/trunk/reference/imap/functions/imap-search.xml =================================================================== --- phpdoc/en/trunk/reference/imap/functions/imap-search.xml 2011-06-15 19:26:01 UTC (rev 312194) +++ phpdoc/en/trunk/reference/imap/functions/imap-search.xml 2011-06-15 19:59:00 UTC (rev 312195) @@ -38,7 +38,8 @@ <para> A string, delimited by spaces, in which the following keywords are allowed. Any multi-word arguments (e.g. - <literal>FROM "joey smith"</literal>) must be quoted. + <literal>FROM "joey smith"</literal>) must be quoted. Results will match + all <parameter>criteria</parameter> entries. <itemizedlist> <listitem> <simpara> @@ -219,6 +220,58 @@ </informaltable> </para> </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example xml:id="imap-search.examples"> + <title><function>imap_search</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$conn = imap_open('{imap.example.com:993/imap/ssl}INBOX', 'foo@example.com', 'pass123', OP_READONLY); + +$some = imap_search($conn, 'SUBJECT "HOWTO be Awesome" SINCE "8 August 2008"', SE_UID); +$msgnos = imap_search($conn, 'ALL'); +$uids = imap_search($conn, 'ALL', SE_UID); + +print_r($some); +print_r($msgnos); +print_r($uids); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Array +( + [0] => 4 + [1] => 6 + [2] => 11 +) +Array +( + [0] => 1 + [1] => 2 + [2] => 3 + [3] => 4 + [4] => 5 + [5] => 6 +) +Array +( + [0] => 1 + [1] => 4 + [2] => 6 + [3] => 8 + [4] => 11 + [5] => 12 +) +]]> + </screen> + </example> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>

« previous php.doc.cvs (#8277) next »