Re: images

From: Date: Tue, 08 Apr 2003 23:43:25 +0000
Subject: Re: images
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142976@lists.php.net to get a copy of this message
Untested, but it should work to print out all files with a jpg extension. $directory="directory_where_image_files_are_located"; $fp=opendir("$directory"); while ($files=readdir($fp)) { if (preg_match("/.jpg/",$files)) { echo $files; } } closedir($fp); Hugh ----- Original Message ----- From: "Tyler Durdin" <linuxgeek23@hotmail.com> To: <php-general@lists.php.net> Sent: Tuesday, April 08, 2003 12:48 PM Subject: [PHP] images > Is there a way I can get php to read all of the names of images(car.jpg, > etc...) out of a directory? If so how? > > > > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#142976) next »