php – Storing database records into array

I would want to create an array that will hold records retrieved from a database using a query of SELECT statement.

The records to be retrieved have multiple fields such as lastname, firstname, mi and 20 more fields. What would be the best approach on coding this function?

alright i have followed what prisoner have given below.. the next question is how do i search through this kind of array using queries? for example i want to search for a username..

Source: php – Storing database records into array – Stack Overflow

php – Storing database records into array was last modified: May 12th, 2018 by Jovan Stosic

Leave a Reply