code.progysm.com

htmlspecialchars

Description
	Convertit les caractères <, >, & et " d'une chaîne en &lt;, &gt;, &amp; et &quot;

Syntaxe:
	string htmlspecialchars(string $html[, int $compatMode = ENT_COMPAT | ENT_HTML401 [, string $encoding = 'UTF-8']])

Paramètres:
	string $html

Retour:
	string

Note:
	En 5.4, si la chaîne est dans un autre encodage que UTF-8 et qu'on n'utilise pas le paramètre $encoding, htmlspecialchars retourne une chaîne vide.
	En 5.3, des caractères erronnés sont envoyés.

Test:
	test.progysm.com/php/htmlspecialchars.encoding.php