$select=$this->datas->query("selectdata01fromds_meters_320114102ORDERBYiddesclimit24");$result=$select->result();$datas=array();foreach($resultas$row){$datas[]=$row;}//var_dump($datas);echojson_encode($datas);以上是我查询数据库得出的json,这个json结果输出后是这样的格式:[{"data01":"20.90"},{"data01":"20.90"},{"data01":"21.00"},{"data01":"20.90"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"20.90"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"21.00"},{"data01":"20.90"},{"data01":"20.90"},{"data01":"20.90"},{"data01":"20.90"},{"data01":"20.90"}]可是这个数据不是我想要的,我要把这个json变成这样的格式:[20.90,20.90,21.00,20.90,21.00,21.00....]请问如何实现呢?谢谢
繁星淼淼
相关分类