CodeIgniter question: So I select data from db and I am printing the results like this:
foreach ($query->result() as $row)
{
echo $row->db_item;
}
Foreach returns 3 rows and the result look like this:
010203.
How do I make it so the result should be echoed like this (each row of the result to be sliced somehow, e.g. each row of the result to be retrieved separately):
01
02
03
One last thing, if I add another line after the foreach I only retrieve the last row of the result 03 and not the same 010203. Why is that, theoretically?
foreach ($query->result() as $row)
{
echo $row->db_item;
}
echo $row->db_item; //this returns 01020303
<br>