Return to Snippet

Revision: 15490
at July 7, 2009 15:34 by the_dev


Initial Code
// The One liner
// The <pre> tags make it looks nice and neat and readable.
<pre><? print_r($array); ?></pre>


// The function
function pretty_print($array) {
    echo "<pre>";
    print_r($array);
    echo "</pre>";
}

Initial URL

                                

Initial Description
It's easy to print out an array that is readable and with only one line of code.  This can easily be turned into a nifty function.

Initial Title
Print Array for Debugging

Initial Tags
php, array

Initial Language
PHP