<?php
ob_start(); // start an output buffer
echo ‘This text is from the w3answers buffer*******<br />’; // output that will be stored in the buffer
$w3buffer = ob_get_contents(); // store buffer content in $w3buffer variable
ob_end_clean(); // stop and clean the output buffer
echo ‘This is not from the w3answers buffer!!!!!!!!<br />’;
echo $w3buffer;
?>
O/p
*****
This is not from the w3answers buffer!!!!!!!!
This text is from the w3answers buffer*******
Post new comment