首页 > 编程学习 > php 三维数组转成二维数组

php 三维数组转成二维数组

发布时间:2022/11/24 23:24:26
<?php
$k = 0;
foreach ($hello as $key => $val) {foreach ($val['data'] as $key2 => $val2) {$newhello[$k]['uid'] = $val ['uid'];$newhello[$k]['title'] = $val2['title'];$newhello[$k]['content'] = $val2['content'];$k++;}
}
print_r($newhello);
?>


本文链接:https://www.ngui.cc/el/2111913.html
Copyright © 2010-2022 ngui.cc 版权所有 |关于我们| 联系方式| 豫B2-20100000