title: How do I properly use print_r or var_dump?
body: <p>I use the following snippet quite often when I am debugging:</p>
  
  <pre><code>echo "&lt;pre&gt;" . var_dump($var) . "&lt;/pre&gt;";
  </code></pre>
  
  <p>And I find I usually get a nice readable output.  But sometimes I just don't.  I'm particularly vexed at the moment by this example:</p>
  
  <pre><code>&lt;?php
  
  $username='xxxxxx';
  $password='xxxxxx';
  
  $data_url='http://docs.tms.tribune.com/tech/tmsdatadirect/schedulesdirect/tvDataDelivery.wsdl';
  $start=gmdate("Y-m-d\TH:i:s\Z",time());
  $stop =gmdate("Y-m-d\TH:i:s\Z",time()+3600*24);
  
  $client = new SoapClient($data_url, array('exceptions' =&gt; 0,
                                            'user_agent' =&gt; "php/".$_SERVER[SCRIPT_NAME],
                                            'login'      =&gt; strtolower($username),
                                            'password'   =&gt; $password));
  $data = $client-&gt;download($start,$stop);
  
  print_r($data);
  
  ?&gt;
  </code></pre>
  
  <p>I don't want to reveal my credentials of course, but I am told print_r in this case will do the same as my usual snippet when in fact neither print_r nor my  snippet produce anything other than runon data with no formatting at all.  How can I make it pretty?!</p>