Pretty Print_r for PHP
Provides 2 useful functions for debug printing out
- preprint_r adds a
<PRE> tag before output so array can be easily seen.
- Great for debugging just include from github using
https://rawgit.com/tobya/pprint_r/master/pprint_r.php or copy this, (*1)
Have you every wished you had a better way of viewing a very large array?
This very simple function can be called and will display inline an expandable tree of your array., (*2)
Simple Call, (*3)
If you wish execution to end on print then pass a second parameter, (*4)
If you wish execution to end on print with an message pass a string as the second parameter, (*5)
pprint_r($MyArray,'Execution ended by pprint_r');
Outputs array with html
<PRE> in front of it., (*7)
If you have the text of an array provided by print_r you can use
unprint_r to read it and turn it back into an array., (*8)