title: json_encode return undefined
body: <p>My script returns undefined value from my json_encode php</p>
  
  <p>index.php </p>
  
  <pre><code>&lt;?php
      $returnThis['user'] = "Robin098";
      $returnThis['id'] = "08465";
  
      echo json_encode($returnThis);
  ?&gt;
  </code></pre>
  
  <p>sample.html</p>
  
  <pre><code>&lt;head&gt;
      &lt;script&gt;
          function clickHere(){
              $.get("index.php", function(data) {
              alert(data.user);
              });
          }
  
      &lt;/script&gt;
  &lt;/head&gt;
         &lt;body&gt;
         &lt;input type="button" onclick = "clickHere();" value="ClickHere!"/&gt; 
         &lt;/body&gt;
  </code></pre>
  
  <p>How can I fix this?</p>