2

Sometimes I'm using the var_dump() for debugging which outputs unformatted results.

Is there a way which can display structured information with colors, etc...

Dharman
  • 30,962
  • 25
  • 85
  • 135
user2280288
  • 85
  • 3
  • 8

2 Answers2

12
echo "<pre>";
var_dump($var);
echo "</pre>";
ex3v
  • 3,518
  • 4
  • 33
  • 55
4

My favorite way of viewing var_dump is to install Xdebug. You should then be able to get formatted and colored output as shown on their website.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Ian Hunter
  • 9,466
  • 12
  • 61
  • 77