Looping and TemplateRepeatIndex in Dreamweaver template

前端 未结 2 454
北荒
北荒 2021-01-18 10:59

I am having some trouble with accessing variables, here in this case Setvariable. When I go inside loop, variable doesn\'t exists. Anyone have any insight on this. Appreciat

2条回答
  •  感情败类
    2021-01-18 11:46

    Problems with variables in loops are well known and even documented.

    Basically the first loop is already evaluated by the time you set your variable, so you will always be off by one.

    • Set variable i=0
    • Loop Iteration 1, i=null
    • Loop Iteration 2, i=0
    • Loop Iteration 3, i=1
    • etc

提交回复
热议问题