babyshandy
9/24/2014 - 4:21 AM

http://myphpsource.blogspot.com/2010/01/obstart-save-php-output-to-string-php.html

<?php ob_start(); //Turn on output buffering ?>

Hello world, <a href="http://www.blogger.com/myotherpage.php">link</a>
<div class="style">Content</div>

<?php $var = ob_get_clean(); 
//copy current buffer contents into $message variable and 
delete current output buffer ?>

<?php echo $var; ?>