For a friend who has done PHP development with smarty, it should be known that the Smarty template determines whether the Foreach loop is the last one that can be used for $ Smarty.foreach.name.last to determine if the loop is in the last record, the loops that are common in the thinkphp template are volist, but the attributes of the volist are not directly judged by the properties of the last record. So how do you judge in thinkphp? The following code can implement the last record in thinkphp volist.
Examples of code are as follows, and readers can experience them on their own.
Class= "Last" > Scripting House
The $i in the code snippet above is a count variable in the Volist loop, and the default name is $i, so you can use it directly without declaring it.
http://www.bkjia.com/PHPjc/824687.html www.bkjia.com true http://www.bkjia.com/PHPjc/824687.html techarticle for a friend who has done PHP development with smarty, it should be known that the Smarty template determines whether the Foreach loop is the last one that can be used to determine if the loop is $smarty.foreach.name.last ...