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
Post a Comment