Skip to content

Instantly share code, notes, and snippets.

@tokudu
Created March 12, 2011 23:26
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tokudu/867688 to your computer and use it in GitHub Desktop.
Save tokudu/867688 to your computer and use it in GitHub Desktop.
A function to pretty print a associative array in PHP
<?php
function debug($var = false) {
echo "\n<pre style=\"background: #FFFF99; font-size: 10px;\">\n";
$var = print_r($var, true);
echo $var . "\n</pre>\n";
}
?>
@GeneralCan
Copy link

this is awesome! thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment