Dynamic HTML Table Generation with PHP
Posted: Fri Feb 15, 2008 11:41 pm
HI,
I am trying to create a PHP data grid - which accesses the database - retrieves data fields and data and prints out as a grid.
here the syntax in
<table>
<header row>Header</header row>
<data row colspan='num of fields'>
<div>
<inner table with data>
</div>
</data row>
</table>
The reason for having a DIV is to later use AJAX for inline editing of the row - the problem(s)
- column width of outer table - can't use absolute values since data size varies
- even if I calculate the length of data for a specific field and then set the width - it doesn't respect it
- some of the database tables are many fields (as many as 71)
- tables are declared as <table width='100%' cellpadding=0 cellspacing=0>
what am i missing here ?
I am trying to create a PHP data grid - which accesses the database - retrieves data fields and data and prints out as a grid.
here the syntax in
<table>
<header row>Header</header row>
<data row colspan='num of fields'>
<div>
<inner table with data>
</div>
</data row>
</table>
The reason for having a DIV is to later use AJAX for inline editing of the row - the problem(s)
- column width of outer table - can't use absolute values since data size varies
- even if I calculate the length of data for a specific field and then set the width - it doesn't respect it
- some of the database tables are many fields (as many as 71)
- tables are declared as <table width='100%' cellpadding=0 cellspacing=0>
what am i missing here ?