Skip to content

Instantly share code, notes, and snippets.

@LostKobrakai
Created January 23, 2013 20:05
Show Gist options
  • Save LostKobrakai/4612374 to your computer and use it in GitHub Desktop.
Save LostKobrakai/4612374 to your computer and use it in GitHub Desktop.
short Array dump
function dump($data, $depth=0){
foreach($data as $key => $item){
for($i=0; $i < $depth; $i++){
echo "\t";
}
if(is_string($item)) $item = "String";
echo $key." -> ".$item."\n";
if(is_array($item)) dump($item, $depth+1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment