删除关于key:json_encode的id的单个值的引号

时间:2017-12-15 06:22:54

标签: php json

这是我的json_encoded结果{"id":"1","users":"12325546sw","total":"27","Apps":[{"Row":"37","AppIcon":null,"Apps":"Group Play","DataConsumed":"3","Updated":"2017-12-12 07:16:22"},{"Row":"34","AppIcon":null,"Apps":"Gallery","DataConsumed":"24","Updated":"2017-12-12 07:16:22"}]}

我想删除id值的引号。

1 个答案:

答案 0 :(得分:2)

试试这个

json编码中的

将第二个参数传递为JSON_NUMERIC_CHECK

json_encode($data, JSON_NUMERIC_CHECK);