coldfission Posted September 5, 2008 Share Posted September 5, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/122924-directory-arrays-help-needed/ Share on other sites More sharing options...
BlueSkyIS Posted September 5, 2008 Share Posted September 5, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/122924-directory-arrays-help-needed/#findComment-634889 Share on other sites More sharing options...
coldfission Posted September 6, 2008 Author Share Posted September 6, 2008 it would be nice if i was to store each picture filename in a database somehow, but i don't really want to do that. I want the customer to be able to just upload the picture to the directory and it shows up in the gallery automatically. Quote Link to comment https://forums.phpfreaks.com/topic/122924-directory-arrays-help-needed/#findComment-635449 Share on other sites More sharing options...
steveclondon Posted September 6, 2008 Share Posted September 6, 2008 you need to really to this with a database, when you upload get the file name of the image and store this in the database. Quote Link to comment https://forums.phpfreaks.com/topic/122924-directory-arrays-help-needed/#findComment-635451 Share on other sites More sharing options...
coldfission Posted September 6, 2008 Author Share Posted September 6, 2008 :'( Quote Link to comment https://forums.phpfreaks.com/topic/122924-directory-arrays-help-needed/#findComment-635452 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.