string htmlspecialcharsEx( string text )
The function htmlspecialcharsEx converts text to HTML safe format, replacing special symbols with the corresponding HTML entities:
NoteUnlike the standard PHP function htmlspecialchars, this function allows to specify symbols in the format &symbol_code;.
<? $text = '"if a>b and b>c, then a>c"'; $res = htmlspecialcharsEx($text); // $res now contains: // "if a>b and b>c then a>c" echo $res; // output: // "if a>b and b>c then a>c" ?>