So for anyone who has come across this in the future I wanted to say that i found out the problem and let everyone know.
First off thanks for all the help by the guys that posted.
So the problem wasn't caused by the output buffering code, rather it was what I was including. In my include file I had other php statements that did some stuff and then output it with echo.
What I tried was to use output buffering to create a HTML version of the original include file and then use that (HTML) file in the include statement in the above code samples. That seems to have worked. A bit roundabout but gets the job done.
If anyone comes across this in the future and doesn't get what I mean feel free to email rickya100 at g m a i l . c o m.
Or if anyone comes across this and thinks OMFG why did he do all that when he could have just [insert stupidly simple code here], feel free to send the better way of doing it to the above email. And I thank you in advance.