title: jquery read php array
body: <p>im trying to change one var to get and stuck</p>
  
  <p>here is what I did:</p>
  
  <pre><code>var choices = [['Australia', 'au'], ['Austria', 'at'], ['Brasil', 'br']];
  </code></pre>
  
  <p>so this is working, and I want to change it on </p>
  
  <pre><code>$.getJSON('/modules/profile/readCountry.php',function(data){
      arrays = data;
  });
  var choices = arrays;
  </code></pre>
  
  <p>but is not working</p>
  
  <p>the php file is: </p>
  
  <pre><code>foreach($countryies as $countr =&gt; $countrv) {
      $json[] = array($countrv,$countr);
  }
  header("Content-type:application/json"); 
  $out = array_values($json);
  echo json_encode($out);
  </code></pre>
  
  <p>and output is:</p>
  
  <pre><code>[['Australia', 'au'], ['Austria', 'at'], ['Brasil', 'br']]
  </code></pre>
  
  <p>how to fine out what is missing or is not working ?</p>