note 64544 added to function.print-r
| From: | michael dot hurni at gmail dot com | Date: | Tue, 18 Apr 2006 09:08:57 +0000 |
| Subject: | note 64544 added to function.print-r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108391@lists.php.net to get a copy of this message | ||
if you don't want to show the result of a print_r() but just keep it in a var (for example in a
template assignation)... you cann use this:
<?PHP
function return_print_r($object) {
ob_start();
print_r($object);
$buffer = ob_get_contents();
ob_clean();
return $buffer;
}
echo return_print_r($array);
?>
----
Server IP: 195.221.21.36
Probable Submitter: 86.213.253.165
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit -- http://master.php.net/note/edit/64544
Del: integrated -- http://master.php.net/note/delete/64544/integrated
Del: useless -- http://master.php.net/note/delete/64544/useless
Del: bad code -- http://master.php.net/note/delete/64544/bad+code
Del: spam -- http://master.php.net/note/delete/64544/spam
Del: non-english -- http://master.php.net/note/delete/64544/non-english
Del: in docs -- http://master.php.net/note/delete/64544/in+docs
Del: other reasons-- http://master.php.net/note/delete/64544
Reject -- http://master.php.net/note/reject/64544
Search -- http://master.php.net/manage/user-notes.php