Including simple PHP code into Javascript
<p>How do I make this work? I've googled and even saw some examples here on Stackoverflow which show this kind of coding, but it doesn't work for me.</p>

<pre><code>&lt;script type="text/javascript"&gt;
  var infoClass = "";
  infoClass = &lt;?php echo('test'); ?&gt;;
  alert(infoClass);
&lt;/script&gt;
</code></pre>

<p>The alert box displays empty box.</p>
