Is there a way that you can make the browser output the array like it does on php.net? When I output the array, it prints it in a long line, and I would like it to output it with a line break in between the rows. Thanks for the help in advance!
Try this: echo "<pre>"; print_r($array); echo "</pre>"; PHP: You can easily make a function or a method in a class for easy debugging as well.
Exactly. I always have this function in my functions.php when developing: function pp($p) { echo is_array($p) ? '<pre>'."\n" : ''; print_r($p); echo is_array($p) ? "\n".'</pre>' : ''; unset($p); } Code (markup): You can use it both for regular vars and arrays. Regular vars will not get surroundedn by pre-tags, arrays will.