title: How do you use the global variables from Drupal's PHP Views module
body: <p>I am using the Drupal Views module and PHP Views module. What I have set up is 5 fields which use a PHP block to call to a function I created in Drupal. The PHP code does work and displays the data I want. </p>
  
  <p>There are "Available variables" which are available to the areas where PHP code can be used, in my case its for the "Output code". So for example you have $view, $handler, $static, $row etc. </p>
  
  <p>I have tried to access all of them, I get a 500 internal error or sometimes I get nothing. The error log points to the "views_php/plugins/views/views_php_handler_field.inc" at line 122. I have viewed that file and the code contains the line:</p>
  
  <pre><code>$function($this-&gt;view, $this, $this-&gt;php_static_variable);
  </code></pre>
  
  <p>I have tried calling the code like this:</p>
  
  <pre><code>&lt;?php
  global $view;
  print_r($view);
  ?&gt;
  </code></pre>
  
  <p>Note I have tried without the global line. </p>
  
  <p>How can I gain access to these variables in PHP Views? I am using Drupal 6 and the latest version of the PHP Views module which is views_php 6.x-1.x-dev.</p>
  
  <p>I have called the function "get_defined_vars()" with var_dump and with or without the global keyword the variables mentioned are not available to me. I can however access variables like $user which are global in Drupal.</p>