时间:2021-07-01 10:21:17 帮助过:19人阅读
$arr = Array
(
'0' => Array
(
'a' => Array
(
'id' => 4
)
),
'1' => Array
(
'a' => Array
(
'id' => 5
)
),
'2' => Array
(
'b' => Array
(
'id' => 4
)
),
'3' => Array
(
'b' => Array
(
'id' => 7
)
)
);
$new_arr = array();
foreach($arr as $vl){
foreach($vl as $v) $new_arr[] = $v['id'];
}
print_r($new_arr);
$a = array (
0 =>
array (
'a' =>
array (
'id' => '4',
),
),
1 =>
array (