random image

Discussion in 'PHP' started by klingerrr, Oct 2, 2006.

  1. #1
    code located here:

    http://www.dyn-web.com/scripts/rotate-rand/

    trying to place random image rotation on my webpage below the horizontal nav. site is here:

    www. 386realestate.com/indexpractice

    can anybody at DP help real quick. Should only take a sec..

    thanks.
     
    klingerrr, Oct 2, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    the site wouldn't respond but shouldn't be difficult...

    
    $image[0] = "http://site.com/blah.jpg";
    $image[1] = "http://site.com/smoo.jpg";
    $image[2] = "http://site.com/honk.jpg";
    shuffle($image);
    echo "<img src=\"$image[0]\">";
    
    PHP:
    :)
     
    disgust, Oct 2, 2006 IP