Hi! I'm currently working on a small photo-sharing website that allows user uploads,etc. My problem resides in designing a neat layout to display the thumbnails of the photos that have been uploaded by a particular use.
In the current system, they are displayed in different rows by using the <tr><td></td></tr>, with the photos in the cells. I would like to display them as follows:
A long time ago I did something similar to this. It's very simple...Create a static variable for the number of columns you want. Then, you have another temporary incrementing variable telling you how many images you have outputted already. Once that variable is equal to the static variable, echo a new table row.
Now, you will need another if statement in that loop to make sure you don't echo a new table row if all the photos are used up as well.
Honestly, using a table is a poor implementation. You should just use <div> tags set to blocks with a set width and height.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.