displaying results into 4 columns

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanderprogrammingboy
Forum Newbie
Posts: 1
Joined: Sat Jul 09, 2011 4:35 am

displaying results into 4 columns

Post by sanderprogrammingboy »

hello,

i want to display a member list from my database into 4 columns,
i have found several codes they work, but i have a problem:

i want to display it as this:

membername 1 membername 2 membername 3 membername 4
memberpicture 1 memberpicture 2 memberpicture 3 memberpicture 4

the problem is, i want to display it into a table like this:
tr
td td td td
td td td td
tr

how do i do this ?

thanks!!
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: displaying results into 4 columns

Post by McInfo »

Pretend I have a stack of playing cards. They are arranged in alternating red-black order. I pass one card at a time to you. The first card is red, the second is black, third is red, fourth is black... You need to forward the cards one at a time to a third person who should receive the first four red cards before the first four black cards, then the next four red cards before the next four black cards, etc. How would you do it?
Post Reply