jquery event handler and php script nested inside a div block
<p>Supposing I have the following script</p>

<pre><code>&lt;div id="something"&gt;
    &lt;?php
        // execute a loop
    ?&gt; 
&lt;/div&gt;

&lt;script&gt;
    //use jquery to show "something" div block on and off &lt;toggle&gt; by a button click event, for example
&lt;/script&gt;
</code></pre>

<p>My question is about whether or not the loop in the php tag code is executed each time the div is to be displayed. I think this is not a good way to handle this for possible performance issues, but I have been unable to find another way around to deal with this. Thank you for any advice and corrections.</p>
