Return string from PHP database loop to Javascript array
<p>I'm trying to create a video slideshow using a Javascript array. The array needs to be populated from a database loop. The database of videos is created through a CMS.</p>

<p>I am currently using "push" for my array, FeaturedVideos, but it's not working. How else do I put the returned string into the array?</p>

<pre><code>&lt;% control getFeaturedMedia %&gt;
&lt;script type="text/javascript"&gt;
FeaturedVideos.push('&lt;div class="panel"&gt;&lt;h3&gt;$Title&lt;/h3&gt;&lt;div class="videoBox"&gt;&lt;% if Type = Vimeo %&gt;&lt;iframe src="http://player.vimeo.com/video/$VideoID?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="275" height="184" frameborder="0"&gt;&lt;/iframe&gt;&lt;% else_if Type = YouTube %&gt;&lt;iframe class="youtube-player" type="text/html" width="275" height="184" src="http://www.youtube.com/embed/$VideoID" frameborder="0"&gt;&lt;/iframe&gt;&lt;% else %&gt;$Image.SetSize(275,184)&lt;% end_if %&gt;&lt;/div&gt;&lt;/div&gt;');
&lt;/script&gt;
&lt;% end_control %&gt;
</code></pre>
