문제

I have a table like this:

<table>
<?php foreach($var as $val): ?>
<tr>
<?php foreach($val as $row): ?>
<td> ... </td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table>

How can I code this with mustache?

도움이 되었습니까?

해결책

Assuming you're using the KOstache module, Kostache::factory() and assigning your multidimensional array in your controller. Then using an Implicit iterator to loop through all elements.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top