What are potential issues with including HTML code directly in PHP files?

One potential issue with including HTML code directly in PHP files is that it can make the code harder to maintain and debug, especially for larger projects. To solve this issue, it is recommended to separate the HTML code from PHP logic by using a templating system like PHP's built-in `include` function or a more advanced templating engine like Twig.

<?php
// Separate HTML code from PHP logic using include function
include 'header.php';
?>
<html>
  <body>
    <h1>Hello, World!</h1>
  </body>
</html>
<?php
include 'footer.php';
?>