Home > Article > Backend Development > How to accomplish quoted-printable string conversion in PHP
During the use of PHP, we may need to convert the 8-bit
string into a quoted-printable
string. In order to solve this problem If there is any trouble, we can use the quoted_printable_encode()
function to complete this task. This article will take you to take a look.
First, let’s take a look at the syntax of the quoted_printable_encode() function:
quoted_printable_encode ( string $str )
str: Input string.
Return value: Return the encoded string
Code example:
<?php $str1="php.cn=2021"; echo $str1."<br>"; $str2=quoted_printable_encode($str1); echo $str2; ?>
输出:php.cn=2021 php.cn=3D2021
Recommendation: 《2021 PHP interview questions summary (collection)》《php video tutorial》
The above is the detailed content of How to accomplish quoted-printable string conversion in PHP. For more information, please follow other related articles on the PHP Chinese website!