I need your help please...
I'm having 4 equal size DIV's on the page. There're many images in the database and each of them have specified if it's portrait or landscape style, so each div should contain a single portrait style image or 2 landscape style images resized to fit in it, continuing filling other div's with the same manner.
Here's the similar example, but with only portrait style images - http://site.avtandil.com/index.php?pg_id=1128504689&pg_symbol=604280385
Lets say there're following records in the DB:
ID Name Style
01 1.jpg Portrait
02 3.jpg Landscape
03 4.jpg Landscape
04 2.jpg Portrait
05 5.jpg Landscape
06 6.jpg Landscape
...
They should follow sort order by ID, so first comes div with 1.jpg , then another div with 3.jpg and 4.jpg, then again div with only 2.jpg and another div with 5 and 6, continuing further.
The important thing is that there can be multiple wrapper divs with such 4 DIV's inside, depending on the total number of images.
I'd appreciate your help very much!