[PHPDOC] cvs: phpdoc /en/functions/ imap.xml From: tedp (phpdoc <email protected>)
Date: 05/27/00

tedp Sat May 27 15:56:16 2000 EDT

  Modified files:
    /phpdoc/en/functions imap.xml
  Log:
  Added documentation for the function "imap_mime_header_decode" in the imap-module.
  
  
Index: phpdoc/en/functions/imap.xml
diff -u phpdoc/en/functions/imap.xml:1.15 phpdoc/en/functions/imap.xml:1.16
--- phpdoc/en/functions/imap.xml:1.15 Tue May 23 08:58:32 2000
+++ phpdoc/en/functions/imap.xml Sat May 27 15:56:16 2000
@@ -2440,6 +2440,43 @@
    </refsect1>
   </refentry>
 
+ <refentry id="function.imap-mime-header-decode">
+ <refnamediv>
+ <refname>imap_mime_header_decode</refname>
+ <refpurpose>Decode MIME header elements</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>array <function>imap_header_decode</function></funcdef>
+ <paramdef>string <parameter>text</parameter></paramdef>
+ </funcsynopsis>
+ <para>
+ <function>imap_mime_header_decode</function> function decodes MIME message header extensions that are non ASCII text (see <ulink url="&url.rfc;rfc2047.html">RFC2047</ulink>)
+ The decoded elements are returned in an array of objects, where each object has two properties, "charset" & "text".
+ If the element hasn't been encoded, and in other words is in plain US-ASCII,the "charset" property of that element is set to "default".
+ </para>
+ <para>
+ <example>
+ <title><function>imap_mime_header_decode</function> example</title>
+ <programlisting role="php">
+$text="=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= &lt;keld <email protected>>";
+
+$elements=imap_mime_header_decode($text);
+for($i=0;$i&lt;count($elements);$i++) {
+ echo "Charset: {$elements[$i]->charset}\n";
+ echo "Text: {$elements[$i]->text}\n\n";
+}
+
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ In the above example we would have two elements, whereas the first element had previously been encoded with ISO-8859-1, and the second element would be plain US-ASCII.
+ </para>
+ </refsect1>
+ </refentry>
+
   <refentry id="function.imap-mail-compose">
    <refnamediv>
     <refname>imap_mail_compose</refname>