php为什么不能用数组保存access表的字段
说明:因为服务器环境所制约,只能采用PHP+Access,想用用一个数组$x保存$rs->fields[1]字段,但想要输出$x数组中的元素里PHP提示:Object of class variant could not be converted to string ,代码如下,不知是否代码有错,请大家帮助,谢谢.
$sql = "select * from focus";
$rs = new com("adodb.recordset");
$rs->open($sql,$conn,1,3);
while(!$rs->eof){
$x[] = $rs->fields[1];
$rs->movenext;
}
echo $x[0];