PHP String quoted_printable_encode() FunctionThe quoted_printable_encode() function is a built-in function of PHP which is used to convert an 8-bit string to a quoted-printable string. This function is opposite to the quoted_printable_decode(), and similar to the imap_8bit() function. It returns a quoted printable string that is created according to RFC2045 (MIME http://www.faqs.org/rfcs/rfc2045.html). The syntax for this function is given below: SyntaxParameterstr (mandatory) - This function has only one string parameter as input, which represents the 8-bit string. It is a mandatory parameter. Values ReturnIt returns an encoded string. Supported PHP versionThis function can be implemented by PHP 5.3.0+ versions ExamplesThere are some examples given below which will help us to understand the quoted_printable_encode() function, and it?s working in a better way. Example 1 It will encode the 8-bit string into the quoted-printable string. Browser Output: The browser output of the following code will be: H=C3=ABllo Guy! Welcome to javaTpoint. HTML Output: The HTML output can be seen by right-clicking on browser output and select View page source. The HTML output for the following code will be: Note: The quoted_printable_encode() function is used in the mailing system to encode any message. We use quoted_printable_decode() function at receiver?s end to decode back to the string.Next TopicPHP String Functions |