解决方法:
做了各方面的转换处理都不好使:
$obj='{"order_id":213477815351175,"buyer":100001169269154}';
$obj=$this->json_decode($obj,TRUE);
print_r($obj);
结果:
Array
(
[order_id] => 2.1347781535118E+14
[buyer] => 1.0000116926915E+14
)
最后使用 php自带函数 number_format(),问题得到解决,效果如下:
$obj='{"order_id":213477815351175,"buyer":100001169269154}';
$obj=$this->json_decode($obj,TRUE);
foreach ($obj as $key=>$val){
$obj[$key]=number_format($val,0,'','');
}
print_r($obj);
结果:
Array
(
[order_id] => 213477815351175
[buyer] => 100001169269154
)
05-31
775
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-21
1155
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-18