How can I increment a Smarty variable?

前端 未结 6 1135
梦毁少年i
梦毁少年i 2021-02-19 16:02

I am not usually a Smarty guy, so I\'m a bit stuck.

I want to echo the index of an array, but I want to increment it each time I echo it.

This is what I have...<

6条回答
  •  深忆病人
    2021-02-19 16:55

    wouldn't the $index++ increment it after the echo?

    try ++$index; or do $index++ BEFORE you echo it.

提交回复
热议问题