Thanks webwoRRks,
So is $key a set variable to represent column headings?
At the moment I am using this loop to display my results:
PHP Code:
echo "<table width='340' border='1'
cellpadding='4' cellspacing='0'>\n";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "\t<tr>\n";
foreach ($row as $col_value)
{
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
How would I be able to incorporate the $key variable so that the field names would appear just once (at the top of the table)?
Last edited by Sam Gamgee; 08-18-2004 at 10:11 PM..
|