|
Posted by eholz1 on 02/08/07 19:25
Hello PHP users,
I have a question, I would like to create a table on the fly, with
PHP. I have typically done this just
using the <?php echo ('<table><tr><td>some nice data</td><td>some
nicer data</td></tr></table'); ?>
sometimes I concatenate the tags: echo '<td>' . 'my data' . '</td>',
etc.
It is my desire to build a table with attributes (happily, mostly the
same) like border, padding, cellpadding, cellspacing, etc.
I will be creating the td's, and tr's based on how many images I pull
out of a MYSQL database.
so if I have 20 thumbnail images, I will end up with a table 4 thumbs
across, and 5 rows.
I am thinking about using a loop from the query in the db, which gives
me the image name, location, width,height, etc
and using the image data from the db, and adding the various table
tags to the php code.
I am not using PEAR db, or pecl (cannot get either to work on my
system), I am using just the regular ol mysql query stuff, etc. Works
fine. I am somewhat concerned about speed, since I would like the
page to look "complete",
when the page is viewed.
any info on how to do this like a "real" programmer will help,
Thanks
ewholz
Navigation:
[Reply to this message]
|