mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added documentation for the function "imap_mime_header_decode" in the imap-module.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@25151 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7031890b62
commit
d4a44e0aa1
1 changed files with 37 additions and 0 deletions
|
@ -2440,6 +2440,43 @@ imap_close($mbox);
|
|||
</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?= <keld@dkuug.dk>";
|
||||
|
||||
$elements=imap_mime_header_decode($text);
|
||||
for($i=0;$i<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>
|
||||
|
|
Loading…
Reference in a new issue