in reply to Listing a directory

You mean something like:
$dirtoget="/home/yourname/www/images/"; opendir(IMD, $dirtoget) || die("Cannot open directory"); @thefiles= readdir(IMD); closedir(IMD);
A quick search on Google for opendir contents of directory produced this page which may of of use to you. But it really is that simple!