Array
(
[0] => Array
(
[id] => 106
[icon] =>
[menu_name] => Registration/getSchedulingList
[title] => 门诊挂号获取医生排班信息
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
[1] => Array
(
[id] => 107
[icon] =>
[menu_name] => Registration/change_ol_pay_part
[title] => 门诊挂号更新在线支付额度
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
[2] => Array
(
[id] => 108
[icon] =>
[menu_name] => Registration/getOnLinePay
[title] => 门诊挂号获取在线支付状态
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
[3] => Array
(
[id] => 109
[icon] =>
[menu_name] => Registration/payOrder
[title] => 门诊挂号保存订单
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
[4] => Array
(
[id] => 110
[icon] =>
[menu_name] => Registration/ForAge
[title] => 门诊挂号获取年龄
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
[5] => Array
(
[id] => 111
[icon] =>
[menu_name] => Registration/getPatientPool
[title] => 门诊挂号获取患者列表
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
[6] => Array
(
[id] => 112
[icon] =>
[menu_name] => Registration/getPatientInfo
[title] => 门诊挂号选中患者
[pid] => 6
[is_menu] => 2
[is_race_menu] => 1
[type] => 1
[status] => 1
[condition] =>
[order_list] => 0
)
)
如上打印
$new_arr=[]; //过滤后的新数组 $tmp=[];??? //临时数组,用来转移数据用的 foreach($result as $k=>$v){ ????????????? ????????$tmp['id']=$v['id']; ??????????????????? ? $new_arr[]=$tmp; ??????????????? }
?echo "<pre>"; ?print_r($new_arr); ?echo "<pre>";exit;
打印结果如下
Array
(
[0] => Array
(
[id] => 106
)
[1] => Array
(
[id] => 107
)
[2] => Array
(
[id] => 108
)
[3] => Array
(
[id] => 109
)
[4] => Array
(
[id] => 110
)
[5] => Array
(
[id] => 111
)
[6] => Array
(
[id] => 112
)
)
|