php - Is there a quick way to populate array from DB with record id? -
(simplification)
have table [id][username]
when fetch table not get
[ 0=>[10,'unam1'], 1=>[20,'unam2'], ... ]
but rather use record id array key. there way in php5.4? use pdo.
[ 10=>[10,'unam1'], 20=>[20,'unam2'], ... ]
or
[ 10=>['unam1'], 20=>['unam2'], ... ]
Comments
Post a Comment