是数组
如果是记录集,可以是0-N的也可以是字段名如果是show Tables这个命令,可以是下标可以是0,也可以是tables_in_(db),db就是数据库名称你可以通过这个程序测试
$query=@mysql_query($sql); while($rs=mysql_fetch_array($query)) 

    foreach($rs as $key => $v)
       echo "{$key}:{$v}<br />";
    echo "--------------------------------------------------------<br />";

解决方案 »

  1.   

    mysql_fetch_array,顾名思义,这个函数获取的是一个数组。如果你想返回对象,可以考虑选用mysql_fetch_object代替。对于下标,你可以参考这个函数的定义,这个函数还有第二参数可用。Description
    array mysql_fetch_array ( resource $result [, int $result_type] )Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.
    Parametersresult    The result resource that is being evaluated. This result comes from a call to mysql_query().
    result_type    The type of array that is to be fetched. It's a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and the default value of MYSQL_BOTH. -----------------
    也就是说,mysql_fetch_array($query, MYSQL_ASSOC) 相当于mysql_fetch_assoc
    mysql_fetch_array($query, MYSQL_NUM) 相当于mysql_fetch_row