I was wondering if there was a way to slightly modify the require or include functionality so that it removes line breaks and white space. So it minifies all the html / js inside the documents that im trying to grab.
I tried this:
trim(require('my document.php'));
didn’t work though, is there a correct way to do this?
Cheers,
Doug
You probably want to do something like
Which will get all the output generated by my document.php and minify it, you have to find a minifying library to do it though.