我在 PHP 中有一组数组,如下所示
Array (
[0] => Array
(
[SEQ] => 2
[CODE] => cd1
[DESC] => desc1
)
[1] => Array
(
[SEQ] => 7
[CODE] => cd2
[DESC] => desc2
)
)
我想将其转换为如下所示。它应该提取 SEQ 值和 CODE 值并将它们分配为相应的键和值
Array(
"2" => cd1,
"7" => cd2
)