Hi,
Got a quick question.. How do I get the table headers also
printed/retrieved by PHP for 'echo'??
eg :
1 +--------------+--------------+---------+----------------+
2 | Drive SN | HSA DCM | Family | Media Supplier |
3 +--------------+--------------+---------+----------------+
4 | WMACK0000001 | GD223213JHHS | PIONEER | KOMAG |
5 | WMACK0000002 | GH37489284HH | PIONEER | FUJI |
6 | WMACK0000003 | F023213JHHS | XBOX | KOMAG |
7 | WMACK0000004 | FV23213JHHS | XBOX | |
8 +--------------+--------------+---------+----------------+
The coding can get rows 4-7 printed out but I would like to get row2 printed
out as well. The table's all set up for it already.
I'm using
$result = mysql_query($sql);
$num_results = mysql_num_rows($result);
for ($i = 0; $i < $num_results ; $i++)
{
echo "<tr>\n" ;
$row = mysql_fetch_row($result);
for ($j = 0; $j < sizeof($row) ; $j++)
{
echo "\t" . '<td>';
echo $row[$j] ;
echo "</td> \n";
}
echo "</tr>\n";
}
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php