Posted by "Jared Williams" on 12/16/05 16:10
Hi,
Just unset the ones you've picked
<?php
#random images example
#this is your file
$file = "images.txt";
#open the file
$openFile = file($file);
#generate a random number
srand((double)microtime()*1000000);
#get one of the entries in the file
for ($i = 0; $i < 10; ++$i)
{
$r = array_rand($openFile);
$random_image = $openFile[$r];
echo "<img src='$random_image' height='170' width='100'></img>";
unset($openFile[$r]);
}
?>
Jared
Navigation:
[Reply to this message]
|