Listing certain files from a directory

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Questor
Forum Newbie
Posts: 1
Joined: Thu Apr 15, 2004 9:15 pm

Listing certain files from a directory

Post by Questor »

Hi Guys,

i've been cracking my brain over something that should probably be so simple..

I try to build a small image gallery where the thumbnails and large files are in the same directory. The names are quite simpe catsxx.jpg and catsxx-th.jpg (-th for the thumbnails). Know i try to do a listing of all files containing -th in the filename with the highest xx nr first, but have really no idea how to do this. Than i want to have a <ahref=""> linking the catsxx-th.jpg to the catsxx.jpg file. Could anyone please point me to the right direction how to just show/count the thumbnails and how i'm able to link them to the large files?

Much appreciated,

Questor
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I know your new here...

but it is frowned upon when you ask questions that have been done a million times :P

viewtopic.php?t=20559
check that out...
Post Reply