How to loop diplays of 4 column of items, every row?

From: Date: Fri, 06 Dec 2002 13:28:09 +0000
Subject: How to loop diplays of 4 column of items, every row?
Groups: php.general 
Request: Send a blank email to php-general+get-127248@lists.php.net to get a copy of this message
Hi all... I've tried to figure this one out but I'm really having a headache now. So, I really need your help. Situation: I have a database of images and its own thumbnails created using GD. It worked wonderfully. Problem: I want to display ONLY thumbnails in table form, incrementing in rows of 4 columns. By this I mean that I want to write a script which loops in a way that it displays 4 pictures withdrawn from the database into a row, and then for the next 4 images, displays them into the next row. If you don't understand see the gif below... a script that displays 4 pictures across first ( arrow 1) , then goes to the next row and displays the next 4 ( arrow 2). I can't work out how can i structure my loop to do this. Question: Can all the gurus out there please give me a pointer? I really can't work out the logic or systematic flow of scripting this one. Thank you so much in advance! Yours, Wee Keat Chin ------------------------------------------ "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." - Albert Einstein

« previous php.general (#127248) next »