[PHP] Cut of table when reaches "x" colums

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
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

[PHP] Cut of table when reaches "x" colums

Post by thiscatis »

Hi,

I have no idea how to start on this one, so i hope someone can point me in the right directions.
Basically, what I'd like to have is an overview of some content of in my database.
I want to export that in a html table, but for layout issues I'd like it to loop it in the table,
but starts a new row of the when the table get 3 columns..

So information in database for example:
category 1,category 2,category 3,category 4,...

and the table would be something like this

Code: Select all

+--------+--------+--------+
+ cat1   | cat2   | cat3   |
+--------+--------+--------+
+ cat4   + ....   + .....  +
+--------+--------+--------+
and so on until the loop is finished
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

First listing from our Useful posts
Post Reply