Parabolundertow Posted February 14, 2007 Share Posted February 14, 2007 Hi there, Im hoping you can help me. I'm looking for a way to randomly pull an image or swf file from a directory and display it on my page. I have tried a few php scripts but none so far will let me use swf files... only images. Also .. if there is such a script, is there a way to populate these files drom a database, so I can add a counter when a "banner" is clicked. Thanks Warren Link to comment https://forums.phpfreaks.com/topic/38436-display-random-swf-or-image-script/ Share on other sites More sharing options...
The Bat Posted February 14, 2007 Share Posted February 14, 2007 Take a look at PHP's shuffle() function. Link to comment https://forums.phpfreaks.com/topic/38436-display-random-swf-or-image-script/#findComment-184415 Share on other sites More sharing options...
Parabolundertow Posted February 14, 2007 Author Share Posted February 14, 2007 hi there - thanks for your help. I used rand() then echoed the random dumber into my <img src> Great stuff Thanks Link to comment https://forums.phpfreaks.com/topic/38436-display-random-swf-or-image-script/#findComment-184487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.