PHP Function Reference

PHP quoted_printable_decode() Function



The PHP quoted_printable_decode() function converts a quoted-printable string to an 8 bit string.

The Quoted-Printable encoding is intended to represent data that largely consists of octets that correspond to printable characters in the US-ASCII character set. It encodes the data in such a way that the resulting octets are unlikely to be modified by mail transport. If the data being encoded are mostly US-ASCII text, the encoded form of the data remains largely recognizable by humans. A body which is entirely US-ASCII may also be encoded in Quoted-Printable to ensure the integrity of the data should the message pass through a character-translating, and/or line-wrapping gateway.

Syntax

quoted_printable_decode(string)

Parameters

string Required. Specify the input string.

Return Value

Returns the 8-bit binary string.

Example:

The example below shows the usage of quoted_printable_decode() function.

<?php
$str = "Hello=0AWorld!";

$decode_str = quoted_printable_decode($str);

echo "Decoded string is: $decode_str \n";
?>

The output of the above code will be:

Decoded string is: Hello World!  

❮ PHP String Reference