Guys, i have this on my create action in the controller:
$filhos=new CadTabelaprecoi;
In the view i’ve made this foreach:
foreach ($filhos as $filho) {
echo "Num!";
}
and i get this:
Num!Num!Num!Num!Num!Num!Num!
The problem is, i just have 1 object.
If i made this:
echo count($filhos);
i’ve got this: 1.
Anyone knows why this happen?