htmlentities

htmlentities -- 適用可能な文字を全て HTML エンティティに変換する

説明

string htmlentities(string string);

この関数はhtmlspecialchars()と同じですが、 HTML エンティティと等価な意味を有する文字を HTML エンティティに変換します。

現在のところ、ISO-8859-1 文字セットが使われます。

htmlspecialchars() および nl2br()も参照下さい。