What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » rotation of avatars

rotation of avatars
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7105
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: rotation of avatars
quote:
Originally posted by SpunkyLoveMuff
This is one I knocked up myself...
Bug: count($av) will return 18, but $av[18] doesn't exist. :p

You could simplify things by eliminating the hard-coded array keys and using the array_rand() function...

code:
$path = "http://mywebsite.com/";

$av = array(
    "avatar1.gif",
    "avatar2.jpg",
);

header("Location: " . $path . $av[array_rand($av)]);
10-08-2007 04:19 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
rotation of avatars - by Jarrod on 10-08-2007 at 03:14 AM
RE: rotation of avatars - by Spunky on 10-08-2007 at 03:32 AM
RE: rotation of avatars - by WDZ on 10-08-2007 at 04:19 AM
RE: rotation of avatars - by Jarrod on 10-08-2007 at 04:30 AM
RE: rotation of avatars - by markee on 10-08-2007 at 04:37 AM
RE: rotation of avatars - by Jarrod on 10-08-2007 at 04:43 AM
RE: rotation of avatars - by prashker on 10-08-2007 at 05:51 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On