Don't you dare write few scripts like this! You'll go crazy after the
second one :o)
I guess I'm the glad one to teach you there is a way to bufferize
standard output and then assign it to a variable.
Go to php.net and search for the function ob_start(). Learn to use output
buffernig, I'm sure you'll be satisfied.