How can Heredoc or Newdoc syntax be used to include HTML content in a PHP variable?

To include HTML content in a PHP variable, you can use Heredoc or Newdoc syntax. These syntaxes allow for multi-line strings without the need for escaping special characters. This makes it easier to include HTML content within a PHP variable without worrying about escaping quotes or special characters.

$html_content = <<<HTML
<!DOCTYPE html>
<html>
<head>
    <title>My Website</title>
</head>
<body>
    <h1>Welcome to my website!</h1>
    <p>This is some sample content.</p>
</body>
</html>
HTML;