Hướng dẫn htmlspecialchars decode
(PHP 5 >= 5.1.0, PHP 7, PHP 8) htmlspecialchars_decode — Convert special HTML entities back to characters Descriptionhtmlspecialchars_decode(string The converted entities are: Parametersstring The string to decode. flags A bitmask of one or more of the following flags, which specify how to handle quotes and which
document type to use. The default is flags constants
Return ValuesReturns the decoded string. Changelog
ExamplesExample #1 A htmlspecialchars_decode() example this -> "
htmlspecialchars_decode($str);// note that here the quotes aren't converted The above example will output:
See Also
thomas at xci[ignore_this]teit dot commm ¶ 14 years ago
Anonymous ¶ 16 years ago
or-k at or-k dot com ¶ 17 years ago
pinkgothic at gmail dot com ¶ 12 years ago
benharold at mac dot com ¶ 13 years ago
= "This is a string that could be passed to htmlspecialchars multiple times."; geoffers@gmail ¶ 17 years ago
benharold at mac dot com ¶ 13 years ago
= "Blue & yellow make green.";$var = (htmlspecialchars_decode($var) == $var) ? htmlspecialchars($var) : $var; geoffers at gmail dot com ¶ 17 years ago
|