//This funciton is modified from // http://ca.php.net/manual/en/function.html-entity-decode.php function unhtmlentities($string) { return preg_replace('~&#([0-9][0-9])~e', 'chr(\\1)', $string); }