JQuery within PHP: How can I keep the browser from inserting a closing tag too early?
<p>The output of this code:</p>

<pre><code>&lt;?php
    echo "&lt;script type='text/javascript'&gt; $('#query-info').append('&lt;div class=\"well\"&gt;')&lt;/script&gt;";
    foreach ($_POST as $key =&gt; $entry)
    {
        echo "&lt;script type='text/javascript'&gt; $('#query-info').append('". $key . ": " . $entry . "&lt;br /&gt;')&lt;/script&gt;";
    }
    echo "&lt;script type='text/javascript'&gt; $('#query-info').append('&lt;/div&gt;')&lt;/script&gt;";
?&gt;
</code></pre>

<p>is:</p>

<pre><code>&lt;div class="well"&gt;&lt;/div&gt;
itemID: 1
&lt;br&gt;
&lt;/div&gt;
</code></pre>

<p>Note the extra unwanted (first) closing div.</p>
