note 90130 deleted from function.print-r by danbrown
| From: | danbrown@php.net | Date: | Tue, 07 Apr 2009 17:24:12 +0000 |
| Subject: | note 90130 deleted from function.print-r by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152913@lists.php.net to get a copy of this message | ||
Note Submitter: liamtoh6 at hotmail dot com
----
@sebasg37 at gmail dot com.
You can do it easier using this method:
<?php
$output = print_r($some_array, true);
?>
I also like to add the following function somewhere globally accessible during development:
<?php
function print_r2($v){
echo '<pre>' . print_r($v, true) . '</pre>';
}
?>
This gives a quick way to output readable arrays without additional typing every time.