B.J. your answer was great!
And both examples seem to work perfectly with microtime()*1000000
So in analyzing the code I found in the help files a statement that if you
use foreach() you do not need to use reset()
I removed it from the code and it worked (I think) the same. Thank you for
the tutorial I am learning a lot. ;-)

srand ((float)microtime()*1000000);
$directory = dir("ads");
while($filename = $directory->read())
   if ($filename != "." && $filename != ".."
   && $filename != "index.php") {
         $keyval = rand();
         $filenames[$keyval] = $filename;
    }
ksort($filenames);
reset($filenames);
//foreach($filenames as $filename)
    include("ads/$filename");

Also on my previous random attempts I found in the php help file - "srand" a
comment at the bottom that stated:

May I suggest rather than this:
(double)microtime()*1000000
Use this instead:
(double)microtime()*1234567
1000000 is an even number, divisible by almost anything. 1234567 is a prime
number and is hence uneven so it gives a little more flexibility with range.
Don't know if this change was the main reason for affecting the application,
but it seemed to help.

Once again Thank You for all of your help as I journey down the php path.

Regards
Loren Wolsiffer





____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to