title: Return an array value from included file in a function
body: <p>Ok, stupid question, I guess...</p>
  
  <p>I'm trying to do this:</p>
  
  <p><strong>File:</strong> pt.php</p>
  
  <pre><code>&lt;?php $langlist = array ( "Car" =&gt; "Carro", "Big Car" =&gt; "Carro grande") ?&gt;
  </code></pre>
  
  <p><strong>File:</strong> index.php</p>
  
  <pre><code>&lt;?php
  $lang = 'pt';
  if ($lang != 'en') include('locale/' . $lang . '.php');
  function __($langstring){
      if ($lang != 'en'){
          echo $langlist[$langstring];
      } else {
          echo $langstring;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>But this doesn't work  (Notice: Undefined variable: lang and langlist).</p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>P.S.:</strong> I know using <code>echo</code> instead of <code>return</code> inside a function ins't correct, but I don't want do be using <code>echo __();</code> every time I need to use this function...</p>