title: Passing a variable from PHP to jQuery on page load
body: <p>I'm trying to take a reference variable from the url, and query my database when the user first visits the page. 
  I then need to take this results and plot on google maps. </p>
  
  <pre><code>&lt;?php 
      include('storelocator/db/config.php');
      include('storelocator/db/db.php');  
  
      if(isset($_GET['ref'])){
  
          $ref = stripslashes($_GET['ref']);
  
          $sql = "SELECT * FROM `markers` WHERE `ref` = \"".$_GET['ref']."\"";
  
          $result = mysql_query($sql);    
          $row = mysql_fetch_row($result);
          print_r($row);
      }
  ?&gt;
  </code></pre>
  
  <p>This is my code at the top of my index page, it works fine, the print_r gives the correct results. I'm just not sure how to pass these results to jQuery to be plotted. (I know how to plot, I basically need to know how to pass a variable $row['latlng'] to jQuery.)</p>
  
  <p>thanks</p>