Answer the question
In order to leave comments, you need to log in
for not working in twig?
Help me deal with for in twig docs read the video watched but the result is zero
php code
$records = $flat -> inputRecords;
echo $twig -> render('main.html',
[
'house' => $flat -> house,
'flat' => $flat -> flat,
'content' => $content,
'input' => $input,
'FIO' => $flat -> Person['fio'],
'PHONE' => $flat -> Person['phone'],
'MONEY' => $flat -> Person['dolg'],
'DATE' => $flat -> Person['date'],
'records' => $records
]);
{% for record in records %}
<tr>
<td>{{ record.date }}</td>
<td>{{ record.ndoma }}</td>
<td>{{ record.nkvart }}</td>
<td>{{ record.ХВС1 }}</td>
<td>{{ record.ГВС1 }}</td>
<td>{{ record.ХВС2 }}</td>
<td>{{ record.ГВС2 }}</td>
<td>{{ record.t1 }}</td>
<td>{{ record.t2 }}</td>
<td>{{ record.autor }}
{{ record.comment }}</td>
</tr>
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question