php clear output
snippet in php

php clear output

user6958

ob_end_clean();

php clear echo

user268

<?php

ob_start();
echo 'a';
print 'b';

// some statement that removes all printed/echoed items
ob_end_clean();

echo 'c';

// the final output is equal to 'c', not 'abc'

?>