I have three files.
header.php
index.php
footer.php
The header file contains from <html>
to <div id='content'>
The index file contains page content
The footer file contains </div>
to </html>
Together they contain a normal HTML file with PHP
When I use Tidy HTML to tidy up my php files' HTML, it does something wrong. When I tidy header.php, it adds closing tags to my div called content and it shouldn't. The div is continued through index.php and closed in footer.php to specify the content's of the file.
Is it possible to make HTML Tidy ignore missing end tags?
It can be solved this way:
<html>
<head>
<?php include "head.php" ?>
</head>
<body>
<?php include "header.php" ?>
<?php include "index.php" ?>
<?php include "footer.php" ?>
</body>
</html>
And the files index.php, head.php, header.php and footer.php now should have starting and closing tags. The program does that because it thinks you missed the closed tags. I saw Tidy HTML and it puts the close tags automatically.
Source: My experience doing sites this way