If you are working in pure PHP5 OOP, you could like to try the new SPL 
iterators.
see http://www.phpro.org/tutorials/Introduction-to-SPL.html#12


vincent

-----Original Message-----
From: Tom Chubb [mailto:[EMAIL PROTECTED]
Sent: Tue 28/11/2006 9:55
To: [php] PHP General List
Subject: [PHP] Readdir
 
What would be the best way to retrieve a list of files from an upload
folder that are called "id" where the extension could be .doc .txt or
.pdf
For example, I have a folder where people can upload a document and
the document is renamed as their user id. They can upload a PDF, DOC
or TXT file. They may wish to upload one of each. I am using
file_exists for each case, but is there an easier/tidier way of doing
it?
Thanks in advance,

Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to