String Functions
Advertisements

PHP quoted_printable_encode() Function

Topic: PHP String ReferencePrev|Next

Description

The quoted_printable_encode() function convert a 8 bit string to a quoted-printable string.

The following table summarizes the technical details of this function.

Return Value: Returns the encoded string.
Version: PHP 5.3.0+

Syntax

The basic syntax of the quoted_printable_encode() function is given with:

quoted_printable_encode(string);

The following example shows the quoted_printable_encode() function in action.

<?php
$str = "Hello\nWorld!"; // "\n" represent line feed or new line
echo quoted_printable_encode($str);
?>

Note: The quoted-printable encoding is used 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.


Parameters

The quoted_printable_encode() function accepts the following parameters.

Parameter Description
string Required. Specifies the input string.
Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties