How to change key of array into first element array ? I preferred using array_map.
Now I have a common array. If I have an array like this :
[
0 => [
'barang_id' => '7389'
'spec' => 'KCH8AT-DM'
'heat_no' => '7B4784'
'coil_no' => '0210'
'size' => '17.9'
'weight' => '2014'
'container' => 'TCLU6265556'
]
1 => [
'barang_id' => '7390'
'spec' => 'KCH8AT-DM'
'heat_no' => '7B4784'
'coil_no' => '0050'
'size' => '17.9'
'weight' => '2006'
'container' => 'TCLU6265556'
]
]
I need like this. The value of first element array is going to be key of array.
[
7389 => [
'barang_id' => '7389'
'spec' => 'KCH8AT-DM'
'heat_no' => '7B4784'
'coil_no' => '0210'
'size' => '17.9'
'weight' => '2014'
'container' => 'TCLU6265556'
]
7390 => [
'barang_id' => '7390'
'spec' => 'KCH8AT-DM'
'heat_no' => '7B4784'
'coil_no' => '0050'
'size' => '17.9'
'weight' => '2006'
'container' => 'TCLU6265556'
]
]
Please advise

