Web Programming Languages

PHP: Directory Read

Read the contents of a directory of images. Exclude the non-image directory entries. Create a caption by deleting the file extension and capitalizing the file name.

Choose a directory: ComicsEmbroideryCarvingTech

Reuben
Simeon
Levi
Judah
Dan
Naphtali
Gad
Asher
Issachar
Zebulun
Joseph
Benjamin

We can change the order of the files (for example, birth order instead of alphabetical order) by prepending each file name with a number and removing the number from the caption string.

Images courtesy of:
Stone Paperweight at World of Judaica
Embroidery Designs at 4-Hobby.com
Dumbing of Age
Scary Go Round
Questionable Content

Show PHP source code »