Whenever I wanted to get index an array by the column value I used to do the following

<?php
$arr = [
    [
        'id' => 'd604679c',
        'name' => 'Jac Wright',
        'email' => '[email protected]',
    ],
    [
        'id' => '9d8d42bf',
        'name' => 'Arul Kumaran',
        'email' => '[email protected]',
    ],
];

print_r(array_combine(array_column($arr, 'id'), $arr));
/* //prints the following
Array
(
    [d604679c] => Array
        (
            [id] => d604679c
            [name] => Jac Wright
            [email] => [email protected]
        )

    [9d8d42bf] => Array
        (
            [id] => 9d8d42bf
            [name] => Arul Kumaran
            [email] => [email protected]
        )

)
*/

Because I assumed array column will only extract the values in one column, in fact, it can extract any column as key and any column as the value. See the following example

print_r(array_column($arr, 'name', 'id'));
/* //prints
Array
 (
     [d604679c] =&gt; Jac Wright
     [9d8d42bf] =&gt; Arul Kumaran
 )
*/

going further, we can send null as the second parameter to get the same response as before

print_r(array_column($arr, null, 'id'));
/* //prints the following
Array
(
    [d604679c] => Array
        (
            [id] => d604679c
            [name] => Jac Wright
            [email] => [email protected]
        )

    [9d8d42bf] => Array
        (
            [id] => 9d8d42bf
            [name] => Arul Kumaran
            [email] => [email protected]
        )

)
*/