I have always fetched database results as Arrays
and NOT Objects
and the reason being PHP provides so many functions to manipulate arrays
that it makes my life easy.
I went over this SO Question Objects or Arrays?
But it does not answer my question. Guy who worked before in my project always fetched results as Objects
and it gave me a real hard time converting it to arrays
and then manipulate them since I was generating leads statistics. Array Functions made it easy.
Is there an easy way to do so? or Any other Alternative? Why go for Objects
and not Arrays
?
NOTE: I am not considering performance
but my ease of manipulation
.