Jump to content


This topic is now archived and is closed to further replies.


List X banners in random order.

Recommended Posts

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.

Share this post

Link to post
Share on other sites
[!--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?

I found this at [a href=\"http://www.hawkee.com\" target=\"_blank\"]http://www.hawkee.com[/a]:

$random_text = array("Random Text 1",
                    "Random Text 2",
                    "Random Text 3",
                    "Random Text 4",
                    "Random Text 5");
$sizeof = count($random_text);
$random = (rand()%$sizeof);

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.