title: Storing database records into array
body: <p>I would want to create an array that will hold records retrieved from a database using a query of SELECT statement.</p>
  
  <p>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?</p>
  
  <p>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..</p>