title: PHP Get Value from JavaScript Variable
body: <p>I have an Index.php file, which contain a simple js,php language for getting a value from javascript, but I can't do that. can you tell me about how to do it?<br /><br />
  <strong>Here is My index.php Wrong Syntax File:</strong>
  <br /></p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;
     var foo = "bar";
  &lt;/script&gt;
  &lt;?php
     $fromJS = "&lt;script&gt;var jsfoo = foo;&lt;/script&gt;";
     echo $fromJS;
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>