Answer the question
In order to leave comments, you need to log in
Twig's if statement not working properly, why?
{% for i in 0..9 %}
<tr>
{% for j in 0..9 %}
<td id ="{{ i ~ j }}"
{% if gameArray[i][j] == "killed" %}
{{ 'class="killed"' }}
{% endif %}
>
{{ gameArray[i][j]}}
</td>
{% endfor %}
</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