Welcome to the forums. Note that I added [noparse]
...
[/noparse] tags around your code so that it would look like code. 🙂
Probably the "real" solution to your issue is rethinking your application design and refactoring things so that you don't have browser output intertwined with processing and business logic. If that's not feasible for whatever reason (schedule, budget, etc.), if I'm correctly understanding the problem, and ugly kludge would be to buffer output, then discard it after doing the desired include, e.g.:
<?php
ob_start();
include "some_file.php";
ob_end_clean(); // ends buffering and cleans out whatever is in the buffer
// rest of code . . .
?>
But like I said: that's just a band-aid, not a true fix (IMHO).