Asked 7 years ago
27 Sep 2017
Views 2178
angeo

angeo posted

what is use of ob_start() and ob_end_clean() in PHP ?

what is use of ob_start() and ob_end_clean() in PHP ?
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

ob_start() and ob_end_clean() used for buffering . it buffer output
ob_start() is the function which start the buffering.
ob_end_clean() is the end of buffering.and clean all stored output so before it one need to store it some where like

$buffer=ob_get_contents();

ob_get_contents() function return all buffered output
Post Answer