// string html_entity_decode( string $string [, int $flags = ENT_COMPAT | ENT_HTML401
// [, string $encoding = ini_get("default_charset") ]] )
// ENT_COMPAT convert only double-quotes
// ENT_QUOTES convert both double and single quotes
// ENT_NOQUOTES don't convert double and single quotes
$s = "I'll \"write\" the <b>php</b> code";
$he = htmlentities($s);
$hed = html_entity_decode($he);
echo $he . "<br />";
echo $hed;
/*
run:
I'll "write" the <b>php</b> code
I'll "write" the php code
*/