Retrieve "the field name itself" instead of "the info of the field name"

From: Date: Sat, 22 Mar 2003 02:42:45 +0000
Subject: Retrieve "the field name itself" instead of "the info of the field name"
Groups: php.db 
Request: Send a blank email to php-db+get-26550@lists.php.net to get a copy of this message
hello everyone, this is my code to retrieve info from my mysql db. This works perfect, but what i also want is a column before this column. In the first column, i want to see the field names from my table. So instead of selecting the info of the field names "uitbater","straatnaam",... , I want to get "uitbater" itself. How can I do this? $result = mysql_query("SELECT uitbater, straatnaam, postcode, gemeente, provincie, telefoon, fax, email FROM info_general") or die (mysql_error()); $num = mysql_numrows($result); print"<table width=200 border=1>\n"; while ($get_info = mysql_fetch_row($result)) { foreach ($get_info as $field) print "\t<tr><td>$field</td></tr>\n"; } print "</table>\n"; mysql_close(); _________________________________________________________________

« previous php.db (#26550) next »