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

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -