note 14256 added to function.ob-get-contents.php
| From: | n dot jouanin at regie-france dot com | Date: | Tue, 24 Jul 2001 11:53:01 +0000 |
| Subject: | note 14256 added to function.ob-get-contents.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15761@lists.php.net to get a copy of this message | ||
Here is a function which get the print_r output into a string using buffers.<BR>
function print_r_log($var)
{
ob_start();
print_r($var);
$ret_str = ob_get_contents();
ob_end_clean();
return $ret_str;
}
http://www.php.net/manual/fr/function.ob-get-contents.php