title: reading an array key from a file, without including the file
body: <p>I have a php file that contains an array <code>$myArray</code>. </p>
  
  <pre><code>&lt;?php 
  $myArray = array(
    'key1'=&gt;'value1',
    'key2'=&gt;'value2',
  );
  ?&gt;
  </code></pre>
  
  <p>I need to read the value of <code>key1</code> from that array. Is there a way to directly read <code>key1</code>, without including the whole file? Right now I'm using include like this. </p>
  
  <pre><code>$includedArray = include('/path/to/myArray.php');
  </code></pre>
  
  <p>but this is creating a problem for me, because even though I include it under a new name <code>$includedArray</code>, it still recognizes the old name <code>$myArray</code> which causes naming conflicts. </p>
  
  <p>To solve this problem, I would have changed the included array from a named array ($myArray) to an un-named array, but I can't make changes to the included files. So is there a way to either: </p>
  
  <ul>
  <li><p>include the file containing the named array, but have it completely forget the original name (<code>$myArray</code>), and have it use ONLY the new name I give it (<code>$includedArray</code>)?  </p></li>
  <li><p>or is there a way to simply read 1 key from the array without including the whole file?</p></li>
  </ul>