I\'d like to get all of a mysql table\'s col names into an array in php?
Is there a query for this?
i no expert, but this works for me..
$sql = "desc MyTable";
$result = @mysql_query($sql);
while($row = @mysql_fetch_array($result)){
echo $row[0]."
"; // returns the first column of array. in this case Field
// the below code will return a full array-> Field,Type,Null,Key,Default,Extra
// for ($c=0;$c";}
}