Home >Backend Development >PHP Tutorial >Smarty's simplest way to achieve odd-even color change in lists_PHP tutorial
This article describes the simplest way to achieve odd-even color change in Smarty. Share it with everyone for your reference. The details are as follows:
I recently encountered a problem in the process of changing templates: changing the color of every other row on the list page. I originally wanted to use a program to achieve it, but I found a very convenient method in the smarty template on the Internet. I would like to share it:
2 3
|
{section name=cat loop=$list}
{$list[cat].id} |
|