Re: [PHP] Describing mysql table

2001-09-18 Thread Gerard Samuel
Hey I figured out my problem. Instead of using a foreach loop, I used a while loop and everything is cool man :). UPDATED CODE: $query = "DESCRIBE mpn_users"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)){ echo "$data[0], $data[1], $data[2]"; } Gerard S

[PHP] Describing mysql table

2001-09-18 Thread Gerard Samuel
Im trying to get results from a mysql command (describe tablename;) into php. I know about the php functions, but I would like the mysql nameing instead. Im trying like so $query = "DESCRIBE users"; $result = mysql_query($query); $array = mysql_fetch_array($result); foreach ($array as $data)