Comparing Arrays - mysql_query & readdir
| From: | Lawrence Blades | Date: | Mon, 03 Jul 2000 12:40:51 +0000 |
| Subject: | Comparing Arrays - mysql_query & readdir | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-4477@lists.php.net to get a copy of this message | ||
I have a mysql table containing the file names of thumbnail images used
in a catalog.
I want to compare those filenames with the actual files stored in the
web server directory.
So I use a mysql_query to create an array of the filenames from the
database, and opendir/readdir to create an array of the directory filenames.
What I would like to do is compare the arrays and list the files that
are in the directory, but not in the database (so I know which images
can be deleted from the directory).
Any help?
--
Lawrence Blades
Digital Technologies
P.O. Box 673
Clarksdale, MS 38614
Hm: 662-627-9539
Office: 662-624-6586
Cell: 662-902-3092