Una manera puede ser esta:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ejemplo</title>
<script>
today = new Date();
day = today.getDay();
arday = new Array("1.swf", "2.swf", "3.swf", "4.swf", "5.swf", "6.swf", "7.swf");
//en la póxima instrucción no debe haber saltos de línea hasta llegar al punto y coma
swf=' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="730" height="98"> <param name="movie" value="'+arday[day]+'" /><param name="quality" value="high" /> <param name="wmode" value="transparent" /> <embed src="'+arday[day]+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="730" height="98"></embed> </object>';
window.onload=function(){
document.getElementById('pp').innerHTML=swf;
}
</script>
</head>
<body>
<div id="pp"></div>
</body>
</html>
Sin embargo, creo que es mejor usar swfObject, que por algo fue uno de los 10 javascripts más usados en 2007 :
http://blog.deconcept.com/swfobject/