generate php in javascript?
<pre><code>var page_my_code_is_on  = (document.referrer);
document.write("&lt;?php echo '" + page_my_code_is_on + "'; ?&gt;");
</code></pre>

<p>how can I write the above php as a var within the js, as opposed to <code>echo</code> ?</p>

<p>I read the following but it did not work for me</p>

<p><a href="http://www.webcheatsheet.com/PHP/passing_javascript_variables_php.php" rel="nofollow">http://www.webcheatsheet.com/PHP/passing_javascript_variables_php.php</a></p>
