Jump to content

directory arrays help needed


coldfission

Recommended Posts

I am trying to automate a customer's photo gallery.

directury structure:

 

pictures/01  - gallery 1

pictures/02  - gallery 2

pictures/03  - gallery 3

 

I want to keep my code flexible so i can expand to more galleries in the future.

 

The gallery page will be a paginated list of ALL pictures no matter folder/gallery they are in. I want each folder to be organized in descending order, but array_merge (?) them in ascending order.

 

This gallery is just a listing of thumbnails that link to the full picture. Now that i have split up the pictures into multiple folders, i have to include which folder that picture is in in the array.

 

I am having trouble with the array structures.

Where do i put the folder variable in the array?

What would my array structure look like?

I'm not very good at working with arrays  :'(

 

 

thanks

 

Link to comment
https://forums.phpfreaks.com/topic/122924-directory-arrays-help-needed/
Share on other sites

are you storing this information in a database? if so, i would skip putting pictures into different directories and simply add a 'gallery_id' field to each picture to identify which gallery it belongs to. then only display the images/thumbs from the selected galleries.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.