combination of fetch_field and fetch_row
| From: | gert vonck | Date: | Sat, 22 Mar 2003 12:31:41 +0000 |
| Subject: | combination of fetch_field and fetch_row | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-26561@lists.php.net to get a copy of this message | ||
hey everyone,
i want to get this result :
----------------------------------------------
| Boss (--> field name) | Mr. Blabla | | Street | Oxford str. | ... ...I did this with : $result0 = mysql_query("SELECT uitbater,straatnaam,postcode,gemeente,provincie,telefoon,fax,email FROM info_general") or die (mysql_error()); $get_info0 = mysql_fetch_row($result0); $i = 0; while ($i < mysql_num_fields($result0)) { $meta = mysql_fetch_field($result0); foreach ($get_info0 as $field0) { print "\t<tr><td>$meta->name</td><td>$field0</td></tr>\n"; } $i++; } He doesn't give an error, but he only prints 8 times the 2nd column and nothing in the first (field name column) Does anyone know how to solve this? Greetz, Gert Vonck _________________________________________________________________ Chat with your online buddies with MSN Messenger http://messenger.msn.be