counter function

counter function

counter saves the current count value for each count.

Users can adjust this value by adjusting interval and direction.

You can also decide whether to output this value. If you need to run multiple counters at the same time, you must specify different names for them.

If no name is specified, the template engine uses "default" as the default value.

If the special attribute "assign" is specified, the output value of the counter will be assigned to the template variable specified by assign instead of being output directly.

eg :

{counter start=0 skip=2 print=false}
{counter}

{counter}

{counter }

{counter}


Output:
2

4

6

8

Continuing Learning
||
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!