How to put php inside javascript?
<p>How to put php inside javascript?</p>

<p><strong>I try (but its not working):</strong></p>

<pre><code>&lt;?php  
$htmlString= 'testing';
 ?&gt;
&lt;html&gt;
  &lt;body&gt;
    &lt;script type="text/javascript"&gt;  
      var htmlString=&lt;?php echo $htmlString; ?&gt;;
      alert(htmlString);
    &lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>tutorial that I use for that parpose:
<a href="http://web-design.lovetoknow.com/Define_PHP_Variables_Inside_Javascript" rel="nofollow">http://web-design.lovetoknow.com/Define_PHP_Variables_Inside_Javascript</a></p>

<p><strong>Thanks</strong></p>
