The htmlentities function converts HTML entities to their corresponding characters.

    
    $string = $orig = "I'll \"walk\" the dog now";

    $stringEntities = htmlentities($string);

    echo $stringEntities;
    // I'll "walk" the <b>dog</b> now