扫码关注官方订阅号
结果:
学习是最好的投资!
json_encode()只将索引数组(indexed array)转为数组格式,而将关联数组(associative array)转为对象格式. 你把 $arr[1] = 'dfsdf'; $arr[0] = '56'; 换个位置 $arr[0] = '56'; $arr[1] = 'dfsdf'; 就是数组了;
json_decode($res,true);这样就可以了
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
json_encode()只将索引数组(indexed array)转为数组格式,而将关联数组(associative array)转为对象格式. 你把 $arr[1] = 'dfsdf'; $arr[0] = '56'; 换个位置 $arr[0] = '56'; $arr[1] = 'dfsdf'; 就是数组了;
json_decode($res,true);
这样就可以了