我的代码有这样的 Json 响应
["0","0","0","0","0","0","204.4"]
需要这样
[ 0, 0, 0, 0, 0, 0, 204.4 ]
为此我已经完成了codeigniter
$query = $this->db->query($selectQuery);
$totalInvoice = array();
foreach ($query->result() as $row)
{
$totalInvoice[] = $row->total;
}
print_r(json_encode($totalInvoice));
这个回应是
["0","0","0","0","0","0","204.4"]