title: Can't access global PHP array variable
body: <p>Within a Drupal module callback function, there is a simple custom function that intakes an array.</p>
  
  <p>The custom function executes correctly when I define the input array within the Drupal module callback function. However, when I define the input array at the root level (global), the custom function within the Drupal module callback function fails.</p>
  
  <p>As a test, I made the custom function simply output the contents of the input array as a string. The first method outputs correctly while the second method does not have any output. Ideally, I'd like to define the array at the global level so that it can be used by other functions.</p>
  
  <p>Thoughts?</p>
  
  <pre><code>&lt;?php
  
  // ** Placement of array for method 2
  $mapping = array(
      0 =&gt; "name",
      1 =&gt; "match"
  );
  
  function mymodule_menu() {
      $items = array();
  
      $items['mymodule'] = array(
          'title' =&gt; 'MyModule',
          'page callback' =&gt; 'myModule_main',
          'access callback' =&gt; TRUE,
          'type' =&gt; MENU_NORMAL_ITEM
      );
  
      return $items;
  }
  
  function myModule_main() {
  
      // ** Placement of array for method 1
      $mapping = array(
          0 =&gt; "name",
          1 =&gt; "match"
      );
  
      $output = myFunction($mapping);
  
      echo $output; // ** Returned to client side via AJAX
  }
  </code></pre>