How to output $variables without loading everything? I'm trying to debug a drupal 7 site and print_r() the $variables variable, but its HUGE and crashes certain pages when there is alot of data in it. Is there a way to only output the first level of the array without outputting everything inside of it?
Devel is a great tool for debugging. It comes with krumo() function which works similar to print_r() but doesn't output everything, only up to certain depth (I think 3 or 4 levels).