note 62908 deleted from function.ob-get-clean by nlopess
| From: | nlopess@php.net | Date: | Sun, 12 Mar 2006 00:34:02 +0000 |
| Subject: | note 62908 deleted from function.ob-get-clean by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-105339@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster at ragnarokonline dot de
Reason: useless
----
Ok, I wrote a function with works similar to ob_get_clean, but doesn't stop output-buffering.
Its simply a combination of ob_get_contents() and ob_clean().
Maybe someone finds it handy.
<?php
function ob_get_buffer()
{
if (($output = ob_get_contents()) !== false AND ob_clean())
{
return $output;
}
return false;
}
?>