Hướng dẫn encoding quoted printable php

❮ PHP String Reference

Example

Decode a quoted-printable string to an 8-bit ASCII string:

The browser output of the code above will be:

Hello world.

The HTML output of the code above will be [View Source]:

Hello
world.

Try it Yourself »

Definition and Usage

The quoted_printable_decode[] function decodes a quoted-printable string to an 8-bit ASCII string.

Tip: Data encoded in quoted-printable are unlikely to be modified by mail transport. A text which is entirely US-ASCII may be encoded in quoted-printable to ensure the integrity of the data should the message pass through a character-translating, or line-wrapping gateway.

Syntax

quoted_printable_decode[string]

Parameter Values

ParameterDescription
string Required. Specifies the quoted-printable string to be decoded

Technical Details

Return Value:PHP Version:
Returns the 8-bit ASCII string
4+

❮ PHP String Reference


[PHP 4, PHP 5, PHP 7, PHP 8]

addslashesQuote string with slashes

Description

addslashes[string $string]: string

  • single quote [']
  • double quote ["]
  • backslash [\]
  • NUL [the NUL byte]

A use case of addslashes[] is escaping the aforementioned characters in a string that is to be evaluated by PHP:


if you need to quote SQL strings it's

Chủ Đề