Osman 2012-05-26 15:19:03
I’m looking for a library in PHP that will let me easily create tables
programmatically. It would be great if I can just specify information about
the rows/columns, what each cell should contain, etc, and the table would
get created automatically. I should be able to do anything I would be able
to do with normal HTML tables. Is there anything like that available?
Th.heuer 2012-05-26 15:19:11
$arr = array(array(‘celldata row 1, col1’, ‘celldata row 1, col2’),
array(‘celldata row 2, col1’, ‘celldata row 2, col2’));
Do you really need a library for that? I had thought about this too but
couln’t come up with a good solution to do this generically and being as
flexible as this. All you have to do is copy/paste the html code and put
some php inbetween if you have a designed table with css and all that
Osman 2012-05-26 15:19:14
Thanks for the reply. I’m actually looking for something to do that
exactly, but output it as an image (via GD, imageMagick, etc). I should’ve
been clearer; I mentioned it in the subject but not the actual e-mail.
There’s actually a PEAR library that does that for HTML, HTML_Table:
http://pear.php.net/package/html_table/redirected. I’m looking for
something very similar, which will allow me to output as an image.