(Simplification)
I have a table [id][username]
Would like when I fetch all from table NOT TO GET
[
0=>[10,'unam1'],
1=>[20,'unam2'], ...
]
but rather use the record ID as the array key. Is there a way in php5.4? I use PDO.
[
10=>[10,'unam1'],
20=>[20,'unam2'], ...
]
OR
[
10=>['unam1'],
20=>['unam2'], ...
]