The mysqli_fetch_fields() function returns an array of objects that represent the fields (columns) in a result set.
mysqli_fetch_fields(result);
name); printf("Table: %s\n",$val->table); printf("max. Len: %d\n",$val->max_length); } // Free result set mysqli_free_result($result); } mysqli_close($con); ?>