The twig syntax for this for loop I am trying to develop a loop in a craft template that adjust the numbers of rows and awards per row based on the total number of awards.  The numbers are all coming back correct but I am struggling with getting the syntax of the loop correct. Below is the type of loop I am trying to execute.

for ($i = 1; ; $i++) {
if ($i &gt; 10) {
  break;
}
  echo $i;
}


But I am getting errors because my syntax is not correct and I cannot seem to find this, although I realize I am probably either just missing it somewhere or not recognizing it.

I was trying something like this, along with other variations, but it keeps throwing errors.

{% set exactRowsNeeded = count / 7 %} &lt;!-- correct --&gt;
{% set rows = ceil(exactRowsNeeded) %} &lt;!-- correct --&gt;
{% set exactAwardsPerRow = count / rows %} &lt;!-- correct --&gt;
{% set awardsPerRow = ceil(exactAwardsPerRow) %} &lt;!-- correct --&gt;

{% set r = 1 %}
{% for r %}
{% if r &lt;= 2 %} 
  {{ r }}
{% set r = r++ %}
{% endif %}
{% endfor %}


Here throws an error at the "for r" line.  It seems to be looking for something like "for r in rows" or something.  Even just a link to an example would be awesome I just cannot seem to get this syntax correct.
The code below ended up solving the issue for me.

{% for row in 0..rows %}