...

View Full Version : Printing the mysql database variable names



vorl
03-15-2007, 01:55 AM
Hi
Currently im using the code below to print the database values in a table. But what this doesnt show is the variable names (ie. column names).

Anybody know a way I can do this? :confused:

Thanks :)



print "<table border=1>\n";
while ($get_info = mysql_fetch_row($result)){
print "<tr>\n";
foreach ($get_info as $field)
print "\t<td><font face=arial size=1/>$field</font></td>\n";

print "</tr>\n";
}
print "</table>\n";

CFMaBiSmAd
03-15-2007, 01:58 AM
See this recent thread - http://www.codingforums.com/showthread.php?t=108976



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum