Heim >Backend-Entwicklung >PHP-Tutorial >关于一个数组的有关问题,重新组合
关于一个数组的问题,重新组合
原数组:
<br />$arr=array<br />(<br /> [0] => Array<br /> (<br /> [caseid] => 31<br /> [name] => 张三<br /> [shijian] => Array<br /> (<br /> [0] => 8:00<br /> [1] => 18:00<br /> )<br /><br /> )<br /><br /> [1] => Array<br /> (<br /> [caseid] => 32<br /> [name] => 李四<br /> [shijian] => Array<br /> (<br /> [0] => 8:00<br /> [1] => 12:00<br /> [2] => 18:00<br /> )<br /><br /> )<br /><br /> [2] => Array<br /> (<br /> [caseid] => 33<br /> [name] => 王五<br /> [shijian] => Array<br /> (<br /> [0] => 8:00<br /> [1] => 12:00<br /> [2] => 18:00<br /> )<br /><br /> )<br /><br />)<br />
<br>Array<br>(<br> [0] => Array<br> (<br> [time] => 8:00<br> [detail] => Array<br> (<br> [0] => Array<br> (<br> [caseid] => 31<br> [casename] => 张三<br> <br> )<br> [1] => Array<br> (<br> [caseid] => 32<br> [casename] =>李四<br> <br> )<br> [2] => Array<br> (<br> [caseid] => 33<br> [casename] => 王五<br> <br> )<br><br> )<br><br> )<br><br> [1] => Array<br> (<br> [time] => 12:00<br> [detail] => Array<br> (<br> [0] => Array<br> (<div class="clear"> </div>