title: Uncaught reference error: .. is not defined .. but I can see the variable in the error string
body: <p>This line of code <code>var $sTest = &lt;?php echo $a = $_GET['ID']?&gt;</code> returns a "Uncaught reference error: .. is not defined."  </p>
  
  <p>For this question, if we assume I am passing an ID of "ABC."  When I use the Developer Tools in Chrome and inspect the Resources, I can see that the $_GET <strong>has</strong> worked because it shows me the variable value.  The error message in this case is "Uncaught reference error: ABC is not defined."</p>
  
  <p>I can't work out how to assign the php variable to a script var.  Help appreciated.</p>