I'm working on a project, and part of that project requires that I convert some of my sql results into an array of class objects.
for convenience sake, i prefer to set my array keys to be the primary key of the sql row so i can access them quickly.
the way i'm doing it right now is to just remap every object to a new array and i set the key manually as $object->id. is there any way i can have pdo do this while fetching the initial array so i don't need to do what i'm doing.