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'];
}
array_values()on each row, or maybe even use one of theprintf()family functions. Offering the best advice requires better understanding your scenario. I can say, generally, that there should be no echoing in the model, and no querying in the view.