thinkphp中关于count()方法的使用:
控制器中:echo count($arr)
模板中:{$arr | count}
模板中if判断语句中 <if condition="count($arr)">.....</if>
在模板中的if语句里的condition 进行大小判断
eq:等于
neq:不等于
lt:小于
gt:大于
标签:if语句 body count post log thinkphp class gpo 控制器
thinkphp中关于count()方法的使用:
控制器中:echo count($arr)
模板中:{$arr | count}
模板中if判断语句中 <if condition="count($arr)">.....</if>
在模板中的if语句里的condition 进行大小判断
eq:等于
neq:不等于
lt:小于
gt:大于
thinkphp 5 count()方法在控制器,模板中的使用方法
标签:if语句 body count post log thinkphp class gpo 控制器
原文地址:https://www.cnblogs.com/tine/p/8669370.html