very simple javascript failing
<p>Working Example:</p>

<p>This is almost identical to code I use in another places on my page but fails here for some reason.</p>

<pre><code>&lt;?php
//$p = "test";
?&gt;

&lt;script&gt;
alert('posts are firing? ');
parent.document.getElementById('posts').innerHTML = "test";
&lt;/script&gt;
</code></pre>

<p>Failing example: (alert still works)</p>

<pre><code>&lt;?php
$p = "test of the var";
?&gt;

&lt;script&gt;
alert('posts are firing? ');
parent.document.getElementById('posts').innerHTML = '&lt;?php $p; ?&gt;';
&lt;/script&gt;
</code></pre>
