Dear Phalcon community,
I'm having some issues with a foreach loop that prints duplicate data.
IndexController:
public function indexAction()
$this->view->robots = robots::find();
$this->view->robots2 = robots2::find();
index.volt:
<table>
{% for robot in robots %}
{% for robot2 in robots2 %}
<tr>
<td> robot.name </td>
<td> robots2.name </td>
</tr>
{% endfor %}
{% endfor %}
</table>
Is there anyway to do this better? I tried it without the foreach loop but it is needed else i get: Undefined variable.
Thanks in advance,