What are some best practices for displaying HTML content in PHP without escaping characters?

When displaying HTML content in PHP without escaping characters, it is important to use the `htmlspecialchars()` function to prevent any potential XSS attacks. This function converts special characters like `<`, `>`, `&`, and `"` to their respective HTML entities, ensuring that the content is displayed as-is without being interpreted as HTML code.

&lt;?php
$html_content = &quot;&lt;h1&gt;Welcome to my website!&lt;/h1&gt;&quot;;
echo htmlspecialchars($html_content);
?&gt;