Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> PHP

Hàm quoted_printable_decode() trong PHP

Giới thiệu

Hàm quoted_printable_decode() giải mã chuỗi quoted-printable về chuỗi 8-bit gốc. Ngược lại của quoted_printable_encode().

Cú pháp

quoted_printable_decode(string $str): string

Tham số

  • str - Chuỗi quoted-printable cần giải mã.

Giá trị trả về

Trả về chuỗi 8-bit ASCII đã giải mã.

Ví dụ

<?php
$s = "Welcome=0Aaboard!";
echo quoted_printable_decode($s);
?>

Kết quả:

Welcome aboard!

Giải thích: =0A là mã hex của newline (LF).