• Tools
  • Articles
  • Q&A
  • Login
0 0

thinkphp模板问题,如何在tp框架自己的模板中判断数组是否为空?


<notempty>
<volist id="vo">

  • {$vo.update_time|date="Y/m/d",###}

  • {$vo.login_name}

  • +{$vo.account}

  • </volist>
    </notempty> <notempty> </notempty>

    程序员 php thinkphp phper

    10 years, 10 months ago
    shhfeng

    shhfeng


    share
    shhfeng 10 years, 10 months ago

    Answers

    0
    
     <volist name="list" id="vo" empty="暂时没有数据" >
    {$vo.id}|{$vo.name}
    </volist>
    
    

    http://document.thinkphp.cn/manual_3_2.html#empty
    多看TP官方的文档

    answered 10 years, 10 months ago
    shhfeng

    longkey


    share
    longkey answered 10 years, 10 months ago

    Your Answer

    Ask Question
    Related questions

    ThinkPHP里的表单令牌如何运用到其他项目中,如何防止跨域提交表单,和伪造表单提交呢?

    Thinkphp 模板引擎 if 嵌套层级过多的问题,嵌套3级就报错,上完整代码

    在考虑一个问题,MVC为什么一定要model一个目录,View一个目录……

    将thinkphp的Lib目录打成phar包,替换掉Lib目录,整合时遇到问题

    如何实现php定时执行任务,且时间是可配置的

    php has encountered a access violation at 0xoooooo