What function can be used in PHP to remove the escape characters from HTML code?

When displaying HTML code in a PHP page, escape characters such as <, >, & are displayed as their HTML entities (&lt;, &gt;, &amp;). To remove these escape characters and display the actual HTML code, you can use the htmlspecialchars_decode() function in PHP. This function decodes special HTML entities back to their original characters.

$html_code = &quot;&amp;lt;p&amp;gt;This is a &amp;lt;strong&amp;gt;sample&amp;lt;/strong&amp;gt; paragraph.&amp;lt;/p&amp;gt;&quot;;
$decoded_html = htmlspecialchars_decode($html_code);
echo $decoded_html;