Hello.
I would like to echo out all the images from a folder on a page with pagination. I have not found something like this on the internet and i am asking now if any of you know of this.

Just a simple image page with 4 rows then a new line of images.

If you got any clue please reply.

Sincerely,
Sorcher

Recommended Answers

All 2 Replies

Have you looked at gallery2 which uses php and mysql to setup and maintain a picture gallery?

Member Avatar for diafol

Should be straightforward enough:

1) count the number of image files in a folder (png, gif, jpg)
2) calculate the number of pages needed if you know how many images per page you want

For a very trivial solution, you could put your filenames into an array and then extract the ones you need from knowing the page_number and images_per_page.

Depending on how you want to place your images, a php loop will spit them out for you.

You can even attach the array to a js slideshow or lightbox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.