List Files in Directory to Array

From: Date: Sun, 15 Jun 2003 23:46:20 +0000
Subject: List Files in Directory to Array
Groups: php.general 
Request: Send a blank email to php-general+get-151609@lists.php.net to get a copy of this message
Hi all... Is there any way of reading the contents of a directory into an array so I can generate a listing from it? I can't see a filesystem function for this, how about with ftp functions? Am looking around at the moment but would appreciate some help. I am looking to read each file in the directory into an array ie: $array_files[1] = "foo.jpg" $array_files[2] = "bar.jpg" etc... So I can then do a foreach and put them all in a drop down box to choose the image. Thanks in advance ;o) Bix

« previous php.general (#151609) next »