function print_table($array){ foreach($array as $k => $v) { if(is_array($v)){ print_table($v); return; } echo "\n{$k}{$v}\n"; } }