<?php $array = [ ['a' => 1, 'b' => 2, 'c' => 3], ['a' => 4, 'b' => 5, 'c' => 6], ['a' => 7, 'b' => 8, 'c' => 9], ]; $result = []; foreach ($array as $row) { $result[array_shift($row)] = $row; } var_export($result);
You have javascript disabled. You will not be able to edit any code.