I have file header.php
<html>
<head>
</head>
<body>
<p>Hello world</p>
Another file footer.php
<p>footerlink</p>
</body>
</html>
Finally i include these both file in my index.php as follows
<?php
include "header.php";
include "footer.php";
?>
Which output as below in browser
<html>
<head>
</head>
<body>
<p>Hello world</p> <p>footerlink</p>
</body>
</html>
How can I minify the this output as below expected result in index.php?
Expected result
<html><head></head><body><p>Hello world</p><p>footerlink</p></body></html>