如何从JSON数据中删除不需要的引号?

When I try to json encode an array using static value it output like :

[
  {"data":[0,0,0,0,0,5],"name":"www.google.com"},
  {"data":[0,0,0,0,0,4],"name":"www.yahoo.com"},
  {"data":[0,0,0,0,85,0],"name":"www.bing.com"}
]

then I tried json encode using dynamic value it output like this

[
  {"data":[0,0,0,0,0,"5"],"name":"www.google.com"},
  {"data":[0,0,0,0,0,"4"],"name":"www.yahoo.com"},
  {"data":[0,0,0,0,"85",0],"name":"www.bing.com"}
]

for non-zero value, there a extra double quotes ("") how remove it ?

You need parse with intval, example:

$arr = array("1", intval("2"));
echo json_encode($arr);

Outputs:

["1",2]