treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Looking for a script.

  • I need to rotate through an affiliate ad and another ad when the page is refreshed. I don't really want to use a plugin. Can someone point me in the right direction.
  • One way I've done before was make them have a 50/50 chance of showing
    if (rand() % 2 == 0 ){
    //show one ad
    } else {
    //show another
    }
    This generates a random number, and checks if its odd or even
    Not perfect, but worked for me