The
htmlspecialchars_decode() string function in PHP will do the opposite of
htmlspecialchars() by converting encoded characters back to their original state.
<?php
$original_input = "<strong>Joe's BBQ Shack</strong>";
$html_encoded = htmlspecialchars($original_input);
echo "Encoded = $html_encoded";
echo "<hr />";
$html_decoded = htmlspecialchars_decode($html_encoded);
echo "Decoded = $html_decoded";
?>
Encoded = <strong>Joe's BBQ Shack</strong>
Decoded = Joe's BBQ Shack