Fix Html Entities

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function fixHtmlEntities($text) {
$entities = array(
"&" => "&",
"&lt;" => "<",
"&gt;" => ">",
"&quot;" => '"',
"&#39;" => "'",
"&apos;" => "'"
);
return strtr($text, $entities);
}
function fixHtmlEntities($text) { $entities = array( "&amp;" => "&", "&lt;" => "<", "&gt;" => ">", "&quot;" => '"', "&#39;" => "'", "&apos;" => "'" ); return strtr($text, $entities); }
function fixHtmlEntities($text) {
    $entities = array(
        "&amp;" => "&",
        "&lt;" => "<",
        "&gt;" => ">",
        "&quot;" => '"',
        "&#39;" => "'",
        "&apos;" => "'"
    );
    
    return strtr($text, $entities);
}