Is there any difference between these two pieces of PHP?
ob_start(); //code... $pageContent = ob_get_contents(); ob_end_clean(); someFunction($pageContent);
ob_get_contents() can be used to continue the output buffering.
ob_get_contents()
Example:
ob_start(); echo 'Something!'; $html1 = ob_get_contents(); echo 'More to say!'; $html2 = ob_get_contents(); ob_end_clean();
At the end the vars have this content:
$html1 = 'Something!'; $html2 = 'Something!More to say!';