1 回答
0
如果您不能使用JSON_NUMERIC_CHECK(因为它需要 PHP 5.3.3 ( json.constants ))
您可以投射到int [ $number = (int)"1234";]
在
while ($r = mysql_fetch_array($sth)) {
$rows['data'][] = (int)$r['revenue']; // <- (int)
}
和
while ($rr = mysql_fetch_assoc($sth)) {
$rows1['data'][] = (int)$rr['overhead']; // <- (int)
}
比
print json_encode($result);
于 2013-07-03T16:17:18.657 回答