I am reading through a directory with some pictures and such using a pretty simple implementation of readdir() like the following:
if ($handle = opendir($pat
You could copy all the filenames into an array and then use