RE: [PHP] um ... arrays

2006-12-21 Thread Edward Kay
$files is empty - nowhere in your while loop do you add any data to it. My guess is your question is really 'Why are my images displayed in the same order as the directory?'. This is because you're displaying them at the same time as reading the dir. To randomise the order, add all the file names

Re: [PHP] um ... arrays

2006-12-21 Thread Stut
Steven Macintyre wrote: I have the following; $files = array(); $curimage=0; if($handle = opendir($dirname)) { while(false !== ($file = readdir($handle))){ if(eregi($pattern, $file)){ $filedate=date ("M d, Y H:i:s", filemtime($file))