PHP funkce htmlentities()
Dostupnost ve verzích: PHP 4.0
Convert all applicable characters to HTML entities
Parametry
| Parametr | Datový typ | Výchozí hodnota | Poznámka | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
$string |
string |
není | Zpracovávaný řetězec. | ||||||||
$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:
|
||||||||
$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
string
the encoded string.