想办法增加一个</tr><tr>
Twig循环中的每一次迭代。
例如:
$numArray = array(12,13,14,15,16,17,18);
比如:
<table>
{% for num in numArray %}
<tr>
<td>
{{num}}
</td>
</tr>
{% endfor %}
</table>
结果:
+-----------+
| 12 |
+-----------+
| 13 |
+-----------+
| 14 |
+-----------+
| 15 |
+-----------+
| 16 |
+-----------+
| 17 |
+-----------+
| 18 |
+-----------+
+-----------+-----------+
| 12 | 13 |
+-----------+-----------+
| 14 | 15 |
+-----------+-----------+
| 16 | 17 |
+-----------+-----------+
| 18 | |
+-----------+-----------+
相似问题