title: PHP and jquery function
body: <p>I would like to know if this code is correct or not...</p>
  
  <pre><code>&lt;?php foreach($ids as $id) { ?&gt; 
    &lt;script&gt;
      loadMetadata(&lt;?$id?&gt;);
    &lt;/script&gt; 
  &lt;?php }?&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;script&gt;
    &lt;?php foreach($ids as $id) ; ?&gt; 
      loadMetadata(&lt;?$id?&gt;);
    &lt;?php } ?&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks</p>