Javascript in php not giving proper result
<pre><code>$a = '&lt;script language="javascript"&gt; var a="1"; document.write(a);&lt;/script&gt;';
echo "A is: ".$a."&lt;br&gt;";
if($a == 1)
{
echo "Its 1";
}
else
{
echo "Its not 1";
}
</code></pre>

<p>I get the following output -<br><br> 
    A is: 1<br>
    Its not 1</p>

<p>Am I doing anything wrong ?</p>
