0

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>
2
  • If you minify header.php and footer.php, the result will be minified. Commented May 29, 2021 at 15:38
  • Any way to minify in index.php? As i have multiple files included in index.php Commented May 29, 2021 at 15:40

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.