title: how to assign javascript variable value to php variable
body: <p>I have declared a <em>javascript variable</em> ,</p>
  
  <pre><code> var myJavascriptVar = 12345;
  </code></pre>
  
  <p>And  unable to assign that value to <em>php</em> variable;</p>
  
  <pre><code> $myPhpVar = 'myJavascriptVar'; 
  </code></pre>
  
  <p>I know Ajax may be the solution of my  problem. 
  But i don't know how to use Ajax and solve the problem.</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;script&gt;
              var myJavascriptVar = 12345;
              &lt;?php $myPhpVar='myJavascriptVar';?&gt; 
          &lt;/script&gt;
          &lt;?php echo $myPhpVar; ?&gt;
       &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>