Example
Delete some output before it can get sent to the browser:
html
<?php
ob_start();
echo "This output will not be sent to the
browser";
ob_clean();
echo "This output will be sent to the browser";
ob_end_flush();
?>
Definition and Usage
The ob_clean() function deletes all of the contents of the topmost output buffer, preventing them from getting sent to the browser.
Syntax
text
ob_clean();
Technical Details
| PHP Version: | 4.2 |
|---|