This function will redirect the output to a buffer. We can flush out the buffer ob_end_flush(). ob_start must be called before any output is made. so the apt place is immediately after opening the php tag.
This function will turn output buffering on. While output buffering is ON no output is sent from the script (but headers), instead the output is stored in an internal buffer. to get contents from output buffer we can use ob_get_contents function