total is used to display the number of iterations that this foreach will loop. This can be used inside or after the foreach. total 用于显示循环执行的次数,可以在循环中或循环执行后调用.