PHP output buffering nightmare

While going through some code at work, I noticed that some output buffering wasnt being ended correctly.

The number of ob_start()'s werent being ended properly, causing a buffer to carry through all the way to the end of the page.

Eventually it was found to be a simple mistake.
The use of "ob_clean()" instead of "ob_end_clean()".
$ret = ob_get_contents();
return $ret;
Please! Just use "ob_start()" and "ob_get_clean()" !!!
They're both one line, respect the current buffering level and incredibly simple to use!
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog