I’m having trouble generating my query result.
$query = $this->db->query("YOUR QUERY");
foreach ($query->result_array() as $row)
{
echo $row['title'];
echo $row['name'];
echo $row['body'];
}
Will this work?
$query = $this->db->query("YOUR QUERY");
foreach ($query->result_array() as $row)
{
echo $row['0'];
echo $row['1'];
echo $row['2'];
}
Thank you.
As Edward mentioned, the array returned is an associative array. While there is no standard way to index into assoc array using integers, you could do it this way: