php variable in javascript
<p>I have the following code in php:</p>

<pre><code>$test = 'abc';
echo '&lt;script type="text/javascript"&gt;\n';
    echo 'movtitle = ' . $test . ';\n';
    echo '&lt;/script&gt;';
</code></pre>

<p>and I tried to do an <code>alert(movtitle)</code>, but it doesn't print out anything. What am I doing wrong?</p>
