> I would like to pick a file out of a directory by random. There are 400
> files and I just want to pick on of those by random.
>
> Is there a way with rand() and file ?

Well there's a couple ways you could do this...it's too early in the morning
to post code but with some quick searches in the manual you should find all
you need.

The most dynamic way to do this is to grab all the filenames in the
directory you want, then randomize the array using shuffle....then use the
first cell value in the array.

If you don't understand what I'm suggesting just lmk =)  I'll try explaining
in better detail when I'm more awake hehe.

Sincerely,

Craig Vincent



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to