title: send Php variables to javascript using AJAX
body: <p>I have two PHP variables that I want to pass to javascript using AJAX. </p>
  
  <p>test.php</p>
  
  <pre><code>$Longitude = json_encode($Long);
  $Latitude =  json_encode($Lat);
  </code></pre>
  
  <p>Index.js</p>
  
  <pre><code>$.ajax({
    type: 'POST',
    dataType: "json",
    url:'test.php',
    data:
    success: function(data)
    {
      console.log("testing");
    }
  });
  </code></pre>
  
  <p>I am new to programming. Please guide how to refer these variable names in the ajax call.</p>