How can unwanted PHP tags like <?php ?> be removed from highlighted code output?

To remove unwanted PHP tags like <?php ?> from highlighted code output, you can use the PHP function `strip_tags()` to remove all PHP tags from the string before displaying it. This will ensure that only the code within the PHP tags is displayed without the tags themselves.

&lt;?php
$highlightedCode = &quot;&lt;?php echo &#039;Hello, World!&#039;; ?&gt;&quot;;
$cleanedCode = strip_tags($highlightedCode);
echo $cleanedCode;
?&gt;