I have php code that retrieve data from mysql DB, and print it in html table.
<?
print "<table>";
$result=mysql_query("select fd1,fd2,fd3 from tbl");
for ($i = 0; $i < mysql_num_rows($result); ++$i)
{
$line = mysql_fetch_row($result);
print "<tr><td>$line[0]</td><td>$line[1]</td><td>$line[2]</td></tr>";
}
print "</table>";
?>
I have no problem to implement above code, this html table contains three columns while each column has multiple lines(rows).
Now in html table I want to merge rows by using ROWSPAN in first column, when DB field "fd2=1", display DB values(one or more) in this merged cell, and leave the other two columns prints row by row. As on web browser data are printed from top to bottom, is it possible to print DB multiple records in merged cell?
Thanks for any response.