But how do i get $files ? thanks :) John Raditha Dissanayake wrote:
> this is in fact pretty easy. > this should get you started > > [code] > $files = split("\n",`ls *gif`); > srand((double)microtime()*1000000); > > $num = rand(0, count($files)); > echo "$num = $files[$num]"; > [/code] > > John Taylor-Johnston wrote: > >I have a directory jammed-packed with images. > >I want to read the directory contents /www/usr/htm/images/ > >and display randomly any *.gif or *.jpg in said directory. > >Do-able? Seriously? Ideas? Places to start? -- John Taylor-Johnston ----------------------------------------------------------------------------- "If it's not open-source, it's Murphy's Law." Université de Sherbrooke: http://compcanlit.ca/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php