I've looked at different peoples' solutions for the 'headers already sent' problem, but none of them fit my scenario.

I am using a PHP script which grabs an HTML file for parsing. Ok, well I am manually adding another include into the HTML file via an external variable.

Now, while I finally got the include to work, my included HTML file has some head code in it that makes it go all the way up to the top of the document, even though I actually have the include close to the end of the document.

This is causing it to spit out "Cannot Send Headers...Headers alredy sent by [included file] on line 346 etc."

Is there a way to tell the include's headers to 'wait' or something instead of loading FIRST?

Any help will be appreciated.