title: How to use a PHP code in JavaScript
body: <p>I want to use PHP code in JavaScript, but it doesn't work:</p>
  
  <pre><code>        &lt;script type="text/javascript"&gt;
             function edit(pollNo)
             {
                 &lt;?php
                     $result = mysql_query( 'CALL ret_poll('.pollNo.')' );
                     $row = mysql_fetch_assoc($result);
                     echo 'document.poll.pollTitle.value='.$row['title'];
                 ?&gt;
             }
          &lt;/script&gt;
  </code></pre>