PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am pretty new to PHP and am trying to develop a theme for a Drupal website. I have 5 swf files (pic_x.swf where x is 1-5) The code I use to embed these files is:
My question is: how can I use PHP to generate a random number to replace "x" in "pic_x.swf" so that one of the 5 files is randomly selected and displayed each time the page loads?