Sponsored Link

foreach + repeat

repeat タグは、foreach タグ内でも利用可能です。

PHP

$assign['sample_foreach10'][] = array('id'=>101, 'count'=>11);
$assign['sample_foreach10'][] = array('id'=>102, 'count'=>21);

Template

{{ @foreach sample_foreach10 }}
    id => count={{ .count }} => {{ @repeat .count }}*{{ @endrepeat }}<br>
{{ @endforeach }}

Result

id => count=11 => ***********
id => count=21 => *********************