PHP quoted_printable_decode() Function
Example
Decode a quoted-printable string to an 8-bit ASCII string:
<?php $str = "I=0Alove=0AShanghai!"; echo quoted_printable_decode($str); ?>
The browser output of the above code is as follows:
Hello world.
The HTML output of the above code is as follows (view source code):
Hello world.
Definition and Usage
quoted_printable_decode() decodes a string that has been encoded with quoted-printable, returning an 8-bit ASCII string
Tip:Data that has been encoded with quoted-printable may differ from that which has been modified during email transmission. Text that is completely US-ASCII can be encoded with quoted-printable to ensure the integrity of the data when messages are transmitted through text translation or line packaging gateways.
Syntax
quoted_printable_decode(string)
Parameter | Description |
---|---|
string | Required. Specifies the quoted-printable string to be decoded. |
Technical Details
Return Value: | Returns an 8-bit ASCII string. |
PHP Version: | 4+ |