Thread: print_r wrapper
View Single Post
Old 06-14-2011, 09:26 PM   PM User | #1
redixx
New Coder

 
Join Date: Jun 2011
Posts: 56
Thanks: 0
Thanked 17 Times in 17 Posts
redixx is an unknown quantity at this point
print_r wrapper

This is just a simple little wrapper I always use in development for print_r(). I hate how it is just an enormous string of text, so I just wrap it in pre tags.

PHP Code:
function print_arr($array)
{
     echo 
'<pre>';
     echo 
print_r($array);
     echo 
'</pre>';

Simple, useful.
redixx is offline   Reply With Quote