Issue trying to embed youtube videos from a PHP Array

TruePaige

Diamond Member
Oct 22, 2006
9,874
2
0
http://napolitopia.com/subpage...page=youtube_php_class

Contains the script I am trying to modify in case anyone wants to example it closer.

I have turned

print "<p><a href=\"".$url[0][$i]."\" target=\"_blank\"><img src=\"".$thumb_nail[0][$i]."\"></a>".$description[0][$i]."</p>";



into


echo "
<object width='425' height='353'><param name='movie' value=\"".$url[0][$i]."\"></param>
<param name='allowFullScreen' value='true'></param>
<param name='allowscriptaccess' value='always'>
<embed src=\"".$url[0][$i]."\" type='application/x-shockwave-flash' wmode='transparent' width='425' height='353'>
</embed></object><br/>";



which doesn't display the videos but if I use "View Source" shows me:

<object width='425' height='353'><param name='movie' value="http://www.youtube.com/watch?v=QuHhzuUJt4Q"></param>
<param name='allowFullScreen' value='true'></param>
<param name='allowscriptaccess' value='always'>
<embed src="http://www.youtube.com/watch?v=QuHhzuUJt4Q" type='application/x-shockwave-flash' wmode='transparent' width='425' height='353'>
</embed></object><br/>

<object width='425' height='353'><param name='movie' value="http://www.youtube.com/watch?v=wHHVW8xejPo"></param>
<param name='allowFullScreen' value='true'></param>
<param name='allowscriptaccess' value='always'>
<embed src="http://www.youtube.com/watch?v=wHHVW8xejPo" type='application/x-shockwave-flash' wmode='transparent' width='425' height='353'>
</embed></object><br/>
<object width='425' height='353'><param name='movie' value="http://www.youtube.com/watch?v=sags2ptV424"></param>
<param name='allowFullScreen' value='true'></param>
<param name='allowscriptaccess' value='always'>
<embed src="http://www.youtube.com/watch?v=sags2ptV424" type='application/x-shockwave-flash' wmode='transparent' width='425' height='353'>

</embed></object><br/>



So....I'm at a loss. Please help me great coders of AT. =)