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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.