Numerical loop in volt

I read the volt documentation on the phalcon page and I cannot find any example for this ...

You can create simple loops in objects, for example in php:

foreach($pages as $page){ echo $page->title; } 

in volts it will be ...

 {% for page in pages %} {{ page.title }} {% endfor %} 

My question is, how can I make a normal digital loop in volts? For instance:

 for($n=1;$n<10;$n++){ echo $n; } 

Thanks.

+6
source share
1 answer

It will count from 1 to 10

 {% for i in 1..10 %} {{ i }} {% endfor %} 
+22
source

All Articles