title: echo statement not working? Seems to be formatted correctly
body: <p>I'm creating a object in javascript echo'd by PHP, the syntax seems to be correct but it is giving me an error.</p>
  
  <p>The variables I am passing to the object are strings and I have tried putting them in quotes, etc. I also tried creating a JS function to do this and it had similar results.</p>
  
  <pre><code>&lt;?PHP 
  
  $TEDS = $db-&gt;query("
  SELECT a.*
  FROM TEDS a
  ");
  //Add each TED location into a javascript array.
  
  echo '&lt;script type="text/javascript"&gt;';
  while($TED = $TEDS-&gt;fetch_assoc())
  {
     echo 'var pos = {lat: '.$TED['latitude'].', lng: '.$TED['longitude'].'};'; //THIS ECHO STATEMENT IS THE ONE GIVING ME PROBLEMS.
  }
  echo '&lt;/script&gt;';
  
  ?&gt;
  
  </code></pre>