note 37828 added to function.print-r
| From: | vincent___at___consultmac at rn2 dot php dot net | Date: | Fri, 28 Nov 2003 17:43:11 +0000 |
| Subject: | note 37828 added to function.print-r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61087@lists.php.net to get a copy of this message | ||
Here is a function that returns the print-out of the print_r() function using output buffering:
--------------------------------------------
function str_print_r($a) {
ob_start();
print_r($a);
$ret = ob_get_contents();
ob_end_clean();
return $ret;
}
----------------------------------------------
Hope it helps!
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37828
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37828&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37828&report=yes
Search -- http://master.php.net/manage/user-notes.php