how to put javascript variable in php inside the javascript code
<p>I have a javascript code that I wanna put a php on it.Then in middle of php code , put a javascript variable.</p>

<p>like this : </p>

<pre><code> &lt;script&gt;
function getuserid(id,shop){
...
    var htmlString="&lt;?php $_SESSION['SELECTED_CID']= {I want to put 'id' variable here}?&gt;";
    }
   &lt;/script&gt;
</code></pre>
