phalcon - Increment in volt showing error -


{% set counter = 0 %}  {% remain_todolist in remain_todolists %}      {% if counter == countrem_todolist %}         ['{{ remain_todolist.project_name }}', {{ remain_todolist.remaining_todos }}]     {% else %}         ['{{ remain_todolist.project_name }}', {{ remain_todolist.remaining_todos }}],     {% endif %}~      {% counter++ %}//showing error  {% endfor %} 

volt increment statement showing error "unknown expression 279"

what doing wrong ?

have tried without do keyword?

anyway, volt loops have counters available use (see loop context), here's version using it:

{% list in remain_todolists %}     ['{{ list.project_name }}', {{ list.remaining_todos }}]{{ loop.last ? '' : ',' }} {% endfor %} 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -