I'm wondering is it possible to echo out an entire media player, such as windows media player,in a similar method to echoing out all other tags such as tables and divs?

The code i want to echo out, only if certain variables dictate, is this:

<OBJECT id='mediaPlayer' width="300" height="250"
      standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>	
      <param name='fileName' value="<?php echo $videolocation; ?>">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='false'>
      <param name='autoStart' value="false">
      <param name='showControls' value="true">
      <param name='loop' value="false">
      <EMBED type='application/x-mplayer2'
       id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
       bgcolor='darkblue' showcontrols="true" showtracker='-1' 
       showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="300" height="250"
       src="<?php echo $videolocation; ?>" autostart="true" designtimesp='5311' loop="true">	

I have tried putting it all inside an echo statement such as:

echo "
//The whole script!

This doesn't work and was wishful thinking on my part; any suggestions would be very much appreciated.

Actually believe it or not it does work, stupidly i forgot to escape the quotation marks in the script (either by using \before them or replacing them with '[if anyone gets the same problem!])
Thanks anyway!

Member Avatar


If you've solved it - mark the thread solved to prevent members from wasting their time. Thanks.