Hi. I would like to know where i can find materials or tutorials regarding this specific issue.
I want the output from my database to be displayed in two columns, where each of the displayed results will have the picture, title and the content (all of them are stored in the database). I have managed to display one record per row, but i think it will be more practical to show two articles(products or whatever) per row. Its a little frustrating because all the websites I'm analyzing are using this kind of display and I don't know how to do it and I can't find how is this done.
Newbie display two columns
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Newbie display two columns
The concept is that you have an integer counter variable that you increment at the end of each loop. In the loop you check to see if the counter is equal to the number of columns you want. If it is you start a new row and set the counter back to its start value (e.g. 1).
(#10850)
Re: Newbie display two columns
Thanks a lot for the answer! It helped 