What is Output Buffering in PHP
HTML is sent to the browser in pieces as PHP processes through PHP script, but with output buffering, HTML is stored in a variable and sent to the browser as one piece at the end of your script.
Advantages of output buffering
Turning on output buffering decreases the amount of time it takes to download and render HTML because it's not being sent to the browser in pieces as PHP processes the HTML.
How to turn-on the buffering
Use ob_start and ob_end_clean/ob_end_flush/ob_clean/ob_flush as follows
ob_start();
// Your HTML portion
ob_end_clean();