Jump to content

List X banners in random order.


willdikuloz

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.
Link to comment
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?
[/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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.