Hướng dẫn
Quảng cáo

Hàm quoted-printable-encode() trong PHP

Hướng dẫn cách sử dụng hàm quoted-printable-encode() trong lập trình PHP

Tác dụng của hàm quoted-printable-encode()

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.

Bài viết này đã giúp ích cho bạn?

Bài viết mới

Advertisements