PHPob_flush() Function
❮ PHP Output Control Functions
Example
Output the contents of a buffer without deleting it:
<?php
ob_start();
echo "This output will be sent to the browser";
ob_flush();
echo "This output will not be sent to the browser";
ob_end_clean();
?>
Try it Yourself »ob_start();
echo "This output will be sent to the browser";
ob_flush();
echo "This output will not be sent to the browser";
ob_end_clean();
?>
Definition and Usage
Theob_flush() function outputs the contents of the topmost output buffer and then clearsthe buffer of the contents. The output may be caught by another output buffer or, if thereare no other output buffers, sent directly to the browser.
Syntax
ob_flush();
Technical Details
| PHP Version: | 4.2+ |
|---|
❮ PHP Output Control Functions

