I've been using Codeigniter for a good while now and i've often wondered which/whether to use Codeigniter's
$query->result()
or $query->result_array()
Personally, I've tended to stick with Arrays as I find it easier to manipulate the array and push items and so forth. The only thing that annoys me slightly is the simply or writing the statements in the view e.g.
$row->title
is a lot cleaner and easier to read than $row['title']
but
$row->{0}
over $row[0]
on the other hand isn't!
I'm still in limbo as to what route to go down, if anyone can tell me more benefits of using Objects over Arrays I'd be delighted!
$row->{0}
?$query->result()
returns an array of objects. – Rocket Hazmat May 23 at 13:34