Home >>PHP String Functions >PHP quoted_printable_encode() Function
PHP quoted_printable_encode() function is used to convert an 8-bit string to a quoted-printable string. This function takes the 8-bit string as input and returns a quoted printable string which is created according to RFC2045. It works opposite to the quoted_printable_decode(), and similar to the imap_8bit() function.
Syntax:
quoted_printable_encode( $string );
Parameter | Description |
---|---|
string | This is a required parameter. This parameter contains the 8-bit string to be converted. |
Here is an example of quoted_printable_encode() function in PHP:
<html> <body> <?php $string = 'Hëllo Everyone'; echo (quoted_printable_encode($string)); ?> </body> </html>
Here is an another example of quoted_printable_encode() function in PHP:
<html> <body> <?php $string = '맩'; echo (quoted_printable_encode($string)); ?> </body> </html>