Home > Backend Development > PHP Problem > How to accomplish quoted-printable string conversion in PHP

How to accomplish quoted-printable string conversion in PHP

autoload
Release: 2023-03-09 12:22:01
Original
2217 people have browsed it

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   )
Copy after login
  • 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;
?>
Copy after login
输出:php.cn=2021
       php.cn=3D2021
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template