The result you show has nothing to do with the fact that it is a resource as such, but the nice print function that you use, noting that the variable you specify indicates a set of database results and a selection and display of results.
What PHP means with resource is that the variable does not actually store data in PHP, but is a pointer or link that some lower-level code module can use - in this case, the database library that can use this link to get the results of a completed query.
If you want a cute print to look similar to an array with a structure similar to a DB database, then you just need to change the cute print function to do this - you don't need to do anything with the array.
IMSoP source share