If the file has been included successfully, and there is no return statement in the included file, $content will be an integer 1. If the file returned something, then $content will be that value. If the file could not be included for whatever reason, then $content would be a boolean FALSE and an E_WARNING would be issued.
Edit: sorry forgot to explain what happens actually:
ob_start(); //This is starting the buffer
include('file2include.php');//now we load the file into the buffer
$var = ob_get_contents();// load the buffer to $var
ob_end_clean();//delete the buffer
//and thats it ;-)
Well as I said it was not my code -and I changed it later on to just "include" - but you could use for something like:
We want to build an small login widget. The html code is somewhere in an extra html file, and we are currently in a class which builds the sidebar widgets.
Now we dont want to "echo" the code when it is executed since we still have some other html which goes first (<head></head><body> etc.). So we could go, copy the content in our variable - and include it anywhere in our site.
Well, it might not be the best example - but I cannot think of any better atm