zoukankan      html  css  js  c++  java
  • 复选框字段数组拆分后循环选项值,if判断根据选项值,前端输出html

    {php $specials = explode(',',$r[special]);}

    <div class="special">
    {loop $specials $special}
    {if $special==1}<span class="color_xhx">小户型</span>
    {elseif $special==2}<span class="color_xf">现房</span>
    {elseif $special==3}<span class="color_ppdc">品牌地产</span>
    {elseif $special==4}<span class="color_sw">双卫</span>
    {elseif $special==5}<span class="color_hyyf">花园洋房</span>
    {elseif $special==6}<span class="color_bs">别墅</span>
    {elseif $special==7}<span class="color_xxzb">学校周边</span>
    {/if}
    {/loop}
    </div>

  • 相关阅读:
    TypeScript 函数
    单链表 C++
    测试用例概念 原则
    TypeScript 类
    TypeScript 接口
    Cellection
    面向对象
    反射
    B树
    无权无向图
  • 原文地址:https://www.cnblogs.com/heqinglin/p/5591691.html
Copyright © 2011-2022 走看看