Alternating Table Columns via while() Loop
I am writing a script that displays items for sale in each category. Obviously, the items are gathered from the database and put into a variable via a while() loop. What I want to do is put them into two seperate variables. One for each of two table columns. I want every other item to alternate. Like:
item 1 -> column 1
item 2 -> column 2
item 3 -> column 1
etc, etc ,etc...
How would I go about doing this? Thanks in advance.
|