On 12 Jul 2007, at 08:56, Jacob Wright wrote:
You could keep a database or xml file or even just a text file with
a list
of all the images. Your PHP could grab the list, throw it into an
array, and
use array_rand() on it
Jacob
I was first thinking of reading all the directories and then picking
one at random, then reading all the filenames in that directory and
then picking one at random. It would work, but it is slower (slow
being a relative term). However, I like Jacob's idea better.
Keeping track of each photo in the database is helpful for many more
reasons than just this one.
Jonathan
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net