For example, let\'s use some simple data set
+---------+------+------+------------+ | name | age | sex | position | +---------+------+------+---------
It's quite old topic, but I found very easy solution:
->fetchAll(\PDO::FETCH_GROUP|\PDO::FETCH_UNIQUE)
First col will be set as key, rest will be set as value.
No need to walk over the array or use array_map.