Example
Delete an output buffer without sending its contents to the browser:
html
<?php
ob_start();
echo "This output will not be sent to the
browser";
ob_end_clean();
echo "This output will be sent to the
browser";
?>
Definition and Usage
The ob_end_clean() function deletes the topmost output buffer and all of its contents without sending anything to the browser.
Syntax
text
ob_end_clean();
Technical Details
| Return Value: | Returns true if the operation was successful or false if it failed |
|---|---|
| PHP Version: | 4+ |