多维数组如何重置索引?
$list=Array
(
[total] => 3
[per_page] => 15
[current_page] => 1
[last_page] => 1
[data] => Array
(
[0] => Array
(
[order_id] => 10065
[order_no] => 2020101955531001
[total_price] => 115.00
)
[2] => Array
(
[order_id] => 10065
[order_no] => 2020101955531001
[total_price] => 115.00
)
)
)
变成这样
$list=Array
(
[total] => 3
[per_page] => 15
[current_page] => 1
[last_page] => 1
[data] => Array
(
[0] => Array
(
[order_id] => 10065
[order_no] => 2020101955531001
[total_price] => 115.00
)
[1] => Array
(
[order_id] => 10066
[order_no] => 2020101955531002
[total_price] => 65.00
)
)
)
array_values,好像弄不了,试过几次,整不动。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)