echoing JavaScript and using PHP variables
<p>What I want do is <code>echo</code> some JavaScript and use PHP variables in the JavaScript code I'm echoing.</p>

<p>Here's what i have tried so far.</p>

<pre><code>echo "&lt;script&gt;document.getElementById('1').innerHTML = $output;&lt;/script&gt;";
echo "&lt;script&gt;document.getElementById('1').innerHTML = '$output';&lt;/script&gt;";
echo "&lt;script&gt;document.getElementById('1').innerHTML = ".$output.";&lt;/script&gt;";
echo "&lt;script&gt;document.getElementById('1').innerHTML = '.$output.';&lt;/script&gt;";
echo '&lt;script&gt;document.getElementById("1").innerHTML = "$output";&lt;/script&gt;';
echo "&lt;script&gt;document.getElementById('1').innerHTML =".'$output'.";&lt;/script&gt;";
</code></pre>

<p>I'm out of ideas, what am I doing wrong here?</p>
