Can anyone tell me where this shows how fast it rotates something? I can't tell by looking. I would like to adjust it to rotate more slowly but can't tell where this would be done. Thanks! $banner_no = (rand()%(count($s_con)-1)); //simple echo the content echo $s_con[$banner_no];
This code will get random number from 0 to count($s_con)-1 and echo the contents of array element with this index (banner code as I understand). More elements in array - less chances to see the same banner twice.
wmtips is right. If you want a particular ad to show more frequently, you would need to add it a few times to the $s_con array. If you wanted to make a particular ad show less frequently, well... you could just add all of the other ads a few more times, but I would suggest redoing the algorithm, basically.
Maybe I'm not making myself clear. I mean how fast does it rotate... seconds, miliseconds, do you see anything like that in it? Because its rotating very fast but this is the only code in the php code that I can see that has anything to do with speed. The other php code doesn't look like it contains anything having to do with how fast it moves. Please let me know, thanks!
the banners are shown in a random order.. so, the script is not "rotating" like showing banner A for x seconds, then banner B for y seconds.. and so on.. it just pick a random banner each time the page is loaded if each banner is in that array 1 time, then each banner has same probablility to show.
Would be good to have a link or something. Maybe it's a problem with the actual image: nothing to do with the PHP code that loads it?
Is the code contained in some kind of loop or something? As petronel said, there is no code there that make the banners rotate..