I'm trying to create a function that will return an array with all the fields of the query result and then loop through it and echo everything. This is what I have done so far. I tried some approaches from similar questions such as I'm trying to create a function that will retur