I have an array structure returned from a db laravel select that looks like this:
array:219 [▼
0 => {#236 ▼
+"mID": "101"
+"qAVG": "6.44444"
}
1 => {#235 ▼
+"mID": "102"
+"qAVG": "4.15068"
}
Apart from looping through the entire array and creating a new variable, is there a function in PHP that can generate something like this:
Array = array(
101 => array(
'qAVG' => 6.44444
),
101 => array(
'qAVG' => 4.15068
)
)
101)