title: How to extract variable with jquery in php from json?
body: <p>I wish to extract one variable by one variable from my json file. My goal is to use this variable in php, to be able to do mysql query for exemple.</p>
  
  <p>So my json file is here: <code>pages/getRank-classic.php?idstart=0</code></p>
  
  <pre><code>[
      {"rank":1,"id":"111","site_name":"test1","site_vip":"No","boost":"0","site_banner":"test.png","site_banner_wallrank":"","site_pointstotaux":"5044","site_motclef1":"Pvp\/Fac","site_motclef2":"Skyblock","site_motclef3":"Cr\u00e9atif","site_motclef4":"Hunger-Games","site_motclef5":"SKywars\/Mini-Gam","site_presentationvideo":"3TGjebmNOfs"},
      {"rank":2,"id":"222","site_name":"test2","site_vip":"No","boost":"0","site_banner":"test.jpg","site_banner_wallrank":"","site_pointstotaux":"4114","site_motclef1":"hunger","site_motclef2":"games","site_motclef3":"pvp","site_motclef4":"survival","site_motclef5":null,"site_presentationvideo":"3TGjebmNOfs"}
  ]
  </code></pre>
  
  <p>I am trying to use it in include like:</p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
  $.ajax({
      type: 'POST',
      dataType: 'json',
      url: '/pages/getRank-classic.php?idstart=0',
      data: data,
      cache: false,
      success: function(test) {
          alert(test.id);
          alert(test.rank);
      }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>So how I can do it please?</p>