I have below array
$a = [
[
0 => 'Name',
1 => 'Address '
],
[
0 => 'Name 1',
1 => 'Address 1'
],
[
0 => 'Name 2',
1 => 'Address 2'
]
];
How to assign 1st element value to rest of the keys?
So it becomes
$a = [
[
'Name' => 'Name 1',
'Address' => 'Address 1'
],
[
'Name' => 'Name 2',
'Address' => 'Address 2'
]
];
So basically I am getting this array of excel file & need above kind of array result.