PHP String quoted_printable_decode() FunctionThe quoted_printable_decode() function is a built-in function of PHP, which converts a quoted-printable string to an 8-bit string. This function returns back an 8-bit binary string. The quoted_printable_decode() function is similar to the imap_qprint() function and opposite to the quoted_printable_encode() function. The syntax of this function is given below: SyntaxParameterstr (mandatory) - This function has only one string parameter as input which will be converted into an 8-bit string. It is a mandatory parameter. Values ReturnIt returns the 8-bit binary string. Supported PHP versionThis function can be implemented by PHP 4+ versions ExampleThere are some examples given below, which will help us to understand the quoted_printable_decode() function and it?s working in a better way. Example 1 It will decode a quoted-printable string to an 8-bit ASCII string. Browser Output: The browser output of the following code will be: Welcome to javaTpoint website. HTML Output: The HTML output can be seen by right clicking on browser output in browser and select View page source. The HTML output for the following code will be: Example 2 Browser Output: The browser output of the following code will be: javaTpoint HTML Output: Note: The quoted_printable_decode() function is used in mail handling in PHP. Most of the times it contains quoted-printable such as =0A, 0D, etc. Therefore PHP provides the built-in functions to deal with such mails to generate plain 8-bit strings.Next TopicPHP String Functions |