I have been using Codeigniter for a long time, and I often wondered what / whether to use Codeigniter
$query->result() or $query->result_array()
Personally, I tended to stick with arrays, since it is easier for me to manipulate the array and click elements, etc. The only thing that annoys me a bit is just to write statements in the view, for example.
$row->title much cleaner and easier to read than $row['title']
but
$row->{0} more than $row[0] , on the other hand, not!
I'm still confused as to which way to go, if anyone can tell me more benefits of using objects over arrays, I would be delighted!
source share