willdikuloz Posted May 16, 2006 Share Posted May 16, 2006 Is there a script/snippet to show X amount of banners in random order? Quote Link to comment https://forums.phpfreaks.com/topic/9745-list-x-banners-in-random-order/ Share on other sites More sharing options...
AndyB Posted May 16, 2006 Share Posted May 16, 2006 No, you'll have to write it yourself and people here will probably help you when you run into a problem. Post whatever code you've already written, telling what's wrong with it. If you want some hints to get you started then you'll have to post some specific information, e.g. where are the filenames for these banners - in a database, in a text file, in an array, nowhere yet. How will 'x' be detemined? etc., etc. Quote Link to comment https://forums.phpfreaks.com/topic/9745-list-x-banners-in-random-order/#findComment-36134 Share on other sites More sharing options...
php_joe Posted May 20, 2006 Share Posted May 20, 2006 [!--quoteo(post=374174:date=May 16 2006, 09:34 AM:name=willdikuloz)--][div class=\'quotetop\']QUOTE(willdikuloz @ May 16 2006, 09:34 AM) [snapback]374174[/snapback][/div][div class=\'quotemain\'][!--quotec--]Is there a script/snippet to show X amount of banners in random order?[/quote]I found this at [a href=\"http://www.hawkee.com\" target=\"_blank\"]http://www.hawkee.com[/a]:[code]<?$random_text = array("Random Text 1", "Random Text 2", "Random Text 3", "Random Text 4", "Random Text 5");srand(time());$sizeof = count($random_text);$random = (rand()%$sizeof);print("$random_text[$random]");?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/9745-list-x-banners-in-random-order/#findComment-37356 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.