Why does this javascript not print out a series of script elements?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/9755908/javascript-how-do-i-print-multiple-script-tags-in-a-loop">JavaScript: How do I print multiple script tags in a loop?</a>  </p>
</blockquote>



<p>Im trying to print these elements from an array but i get a blank screen</p>

<pre><code>&lt;div id="playerContainer" style="width: 20em; height: 180px; float: left;"&gt;
    &lt;object id="player"&gt;&lt;/object&gt;
&lt;/div&gt;
&lt;div id="videos2"&gt;&lt;/div&gt;&lt;script type = "text/javascript"&gt;
for (var i=0; i&lt;arr.length; i++) {
    document.write("&lt;script 
        type="text/javascript" 
        src="http://gdata.youtube.com/feeds/api/videos?q=arr["+i+"] &amp;max-results=8&amp;orderby=relevance&amp;alt=json-in-script&amp;format=5&amp;callback=showMyVideos2"&gt;
    &lt;/script&gt;");

}
&lt;/script&gt;
</code></pre>
