Random Order of Imgs
- Started
- Last post
- 12 Responses
- BattleAxe
I'm looking for some help with a php script to make a set of images display in random order from top to bottom every page load , any links, tuts , I appreciate it !
see an example here
http://www.whatsuppub.com/ far right column
- cosmo0
simple. do you have a script already?
- BattleAxe0
no dont got one
- drgs0
in random order from top to bottom ?
- cosmo0
there you go, if that is what you need. I will email it to you.
- BattleAxe0
thats exactly what I need Cosmo! Thanks a Zillion
- 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?>