On 8/18/05, Levi Smith <[EMAIL PROTECTED]> wrote:
> OK, here's one for you.  I'm hoping this is some easy answer I just haven't
> quite stumbled upon yet.
> 
> How would one go about creating a dynamic 4 column html table based on mysql
> data?
> 
> I.e. I have an unknown amount of categories that would be pulled out of a
> mysql table and I would like each in it's own <td>, but the table only 4
> columns wide.
> 
> I know how to get all the categories out of the table, I've found how to grab
> only 4 items from the table, and I've found how to run a loop 4 times with
> php.  But nothing quite to the effect of filling in a table 4 columns wide
> with an unknown amount of categories.  Is there some way of saying something
> to the effect of:
> SELECT category FROM table until the categories have all been displayed, but
> create a new row after executing every 4 times?
> 
> More or less nesting WHILE statements?

In the olden days (25 years ago) this would be a job for tbl(1) and troff(1).
Perhaps you could use the GNU equivalents gtbl and groff.  Especially
since groff can be stimulated to produce HTML output.

    carl
-- 
    carl lowenstein         marine physical lab     u.c. san diego
                                                 [EMAIL PROTECTED]


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to