Passing value to PHP variable inside script
<p>I have some PHP code inside the script so I need
the JavaScript value as a PHP variable, as follows:</p>

<pre><code>&lt;script&gt;
;
 var js_var = 123;
 var php_var = &lt;?php js_var ?&gt;;
 alert(php_var);
;
&lt;/script&gt;
</code></pre>

<p>Using jQuery to send the value to a PHP page will return the value but not as a PHP variable:</p>

<pre><code>$.get("page.php", {js_var_name: js_var}, function(data) {alert(data)});
</code></pre>

<p>I tried also all jQuery AJAX functions: load(), post() and the ajax() method, none of them pass back the value of PHP as above requested.</p>

<p>Is it possible to implement the above with jQuery?</p>
