title: Uncaught ReferenceError: testString is not defined
body: <p>This is really weird..</p>
  
  <p>I need to send a couple of variables through to jquery from PHP.. one is an INT and the other a string.</p>
  
  <p>When $a is an INT it works fine but when i use a string, i get this error.. <code>Uncaught ReferenceError: testString is not defined</code></p>
  
  <p>Here is my code.</p>
  
  <pre><code>&lt;?php $a = 'testString'; ?&gt;
  
  &lt;script type="text/javascript"&gt;
      var a = &lt;?php echo $a; ?&gt;;
      alert(a);
  &lt;/script&gt;
  </code></pre>
  
  <p>I assumed that i needed to stick a (int) or (string) before the variable, but i wasn't entirely sure how to and unsuccessful in my googles/attempts.</p>
  
  <p>Any ideas?</p>