title: Getting print_r from a Drupal variable
body: <p>I have a Drupal variable, $view. I need to print out all of its values. I have tried:</p>
  
  <pre><code>dsm($view);
  
  var_dump($view);
  
  function hook_form_alter() {
      $form['print'] = array('#value' =&gt; '&lt;pre&gt;'.print_r($view, 1).'&lt;/pre&gt;');
  }
  </code></pre>
  
  <p>All of these functions produce an output of <code>Null</code>, however. How can I get the value of the variable?</p>