Dostupnost ve verzích: PHP 4.0

Convert all applicable characters to HTML entities


Parametr Datový typ Výchozí hodnota Poznámka
$string string   The input string.
$quote_style int null, Like htmlspecialchars, the optional second quote_style parameter lets you define what will be done with ‚single‘ and „double“ quotes. It takes on one of three constants with the default being ENT_COMPAT:
Constant Name Description
ENT_COMPAT Will convert double-quotes and leave single-quotes alone.
ENT_QUOTES Will convert both double and single quotes.
ENT_NOQUOTES Will leave both double and single quotes unconverted.
$charset string null, Like htmlspecialchars, it takes an optional third argument charset which defines character set used in conversion. Presently, the ISO-8859–1 character set is used as the default.
$double_encode bool true When double_encode is turned off PHP will not encode existing html entities. The default is to convert everything.

Návratové hodnoty


the encoded string.

Další zdroje…entities.php

Sponzorované odkazy
Pomohl Vám tento článek?