Random Order of Imgs

Out of context: Reply #10

  • Started
  • Last post
  • 12 Responses
  • cosmo0

    here is the code, if anyone else needs it.

    <?php

    $imgArray = array("http://gfx.download-by.net/screen/21/21173-natalie-portman-sex-e-screensaver.jpg", "http://images.askmen.com/galleries/actress/natalie-portman/pictures/natalie-portman-picture-6.jpg", "http://www.nerf-herders-anonymous.net/NataliePortman.jpg", "http://images.eonline.com/eol_images/Profiles/20060913/244.portman.natalie.091906.jpg");

    // randomize the index
    shuffle($imgArray);

    for ($i = 0; $i < count($imgArray); $i++)
    {
    echo "<p><img src=\"".$imgArray[$i]."\" width=\"100\" height=\"100\" border=\"0\"></p>";
    } // end if

    ?>

View thread