Answers for "how to use ob start php"

PHP
4

why use ob_start() in php

//why use ob_start() in php

<?php
ob_start(); //Start remembering everything that would normally be outputted, but don't quite do anything with it yet
$output = ob_get_contents(); //Gives whatever has been "saved"
ob_end_clean(); //Stops saving things and discards whatever was saved
ob_flush(); //Stops saving and outputs it all at once

?>
Posted by: Guest on September-02-2020

Browse Popular Code Answers by Language