Asked 30+ days ago
27 Sep 2017
Views 657
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 Jan 21 '18 20:17

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
Edit Answer
Share
Post Answer