title: PHP won't echo out or execute JavaScript
body: <p>I need PHP to open up a new window with a text from a variable.</p>
  
  <p>Here's what I tried.</p>
  
  <pre><code>  echo "&lt;script&gt;   
    $myWin=window.open('','$myWin','menubar,scrollbars,left=30px,top=40px,height=800px,width=800px');
    $myWin.document.write(".$logtext."); 
    &lt;/script&gt;";  
  </code></pre>
  
  <p>but it doesn't work. any better ideas or suggestions? Thanks! :)</p>