■特殊文字 -> HTMLエンティティ ( '&' -> '&' )
string htmlspecialchars ( string string, int <VAR class=replaceable>[quote_style]</VAR> [, string charset] )
string htmlentities ( string string, int <VAR class=replaceable>[quote_style]</VAR>, string <VAR class=replaceable>[charset]</VAR> )
■HTMLエンティティ ->特殊文字 ( '&' -> '&' )
<?php
function unhtmlentities ($string)
{
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
return strtr ($string, $trans_tbl);
}
?>