这样可以吗?
$i = 0;
while ($row = mysql_fetch_array($result))
{
$resultset[] = $row;
$columns[] = mysql_fetch_field($result, $i);
}
然后尝试打印
<tr><th><?php echo $columns[0] ?></th><th><?php echo $columns[1] ?></th></tr>
我收到了一个错误
Catchable fatal error: Object of class stdClass could not be converted to string