note 103734 added to function.print-r
| From: | a dot furmanov at i-ween dot com | Date: | Sat, 30 Apr 2011 08:08:45 +0000 |
| Subject: | note 103734 added to function.print-r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179300@lists.php.net to get a copy of this message | ||
Sometimes we want to show only few levels of array/object or disable to show several
branches of array (for example, when we have recursive links in array), and print_r()
doesn't allow us to do this.
I wrote method
function print_a($arr, $return = false, $depth = null, $excludeFilter=array())
that can:
.....
have no chances to insert snippet there by "Your note contains a bit of text that will result
in a line that is too long, even after using wordwrap()." stupid error, so you can get code
there:
http://i-ween.com/samples/print_a.php.txt
(if moderators can add this code there - just do it)
----
Server IP: 213.186.192.247
Probable Submitter: 194.106.218.131
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit -- https://master.php.net/note/edit/103734
Del: integrated -- https://master.php.net/note/delete/103734/integrated
Del: useless -- https://master.php.net/note/delete/103734/useless
Del: bad code -- https://master.php.net/note/delete/103734/bad+code
Del: spam -- https://master.php.net/note/delete/103734/spam
Del: non-english -- https://master.php.net/note/delete/103734/non-english
Del: in docs -- https://master.php.net/note/delete/103734/in+docs
Del: other reasons-- https://master.php.net/note/delete/103734
Reject -- https://master.php.net/note/reject/103734
Search -- https://master.php.net/manage/user-notes.php