How can PHP code be structured to include HTML content without the need for excessive escaping characters?

When including HTML content in PHP code, it can lead to the need for excessive escaping characters, making the code harder to read and maintain. One way to solve this issue is by using PHP's heredoc syntax, which allows for easy embedding of HTML content without the need for escaping characters.

<?php

$html_content = <<<HTML
<!DOCTYPE html>
<html>
<head>
    <title>Example Page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>This is an example of embedding HTML content in PHP using heredoc syntax.</p>
</body>
</html>
HTML;

echo $html_content;

?>