Hey, ok sorry. Right here's a fuller explanation...
I've tested the PHP code by putting it on its own in a .php file, uploading it to the site and looking at what comes out, and it produces the desired result... ie.
<?php $num = rand(1, 4); ?>
"<?php echo $num; ?>.swf">
this produces...