Best way to incorporate javascript in php?
<p>This is the way I am currently doing it. </p>

<pre><code> &lt;?php
//show footer
echo "&lt;script type='text/javascript'&gt;\n";
echo "alert('Congrats');\n";
echo "&lt;/script&gt;";

?&gt;
</code></pre>

<p>Is there a better way than just to echo it?</p>
