how to insert PHP code snippet in javascript
<p>my code- </p>

<pre><code>&lt;?php
session_start();
$_SESSION['errors']="failed";
?&gt;


&lt;head&gt;

    function myfunc()
    {        
         alert(&lt;?php echo $_SESSION['errors']; ?&gt;);
    }
&lt;/head&gt;

&lt;body onload="myfunc();"&gt;
</code></pre>

<p><strong>but alert msg is not popping up.</strong></p>
