View Full Version : Printing the mysql database variable names

03-15-2007, 12:55 AM
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";

03-15-2007, 12: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