This function will turn output buffering on. While output buffering is active no output is sent from the script, instead the output is stored in an internal buffer.
The contents of this internal buffer may be copied into a string variable using ob_get_contents(). To output what is stored in the internal buffer, use ob_end_flush(). Alternatively, ob_end_clean() will silently discard the buffer contents.
An optional output_callback function may be specified. This function takes a string as a parameter and returns a string. The function will be called at ob_end_flush() time and will receive the contents of the output buffer as its parameter. It must return a new output buffer as a result, which is what will be printed.
Output buffers are stackable, that is, you may call ob_start() while another ob_start() is active. Just make sure that you call ob_end_flush()() the appropriate number of times. If multiple output callback functions are active, output is being filtered sequentially through each of them in nesting order.
See also ob_get_contents(), ob_end_flush(),