$str = '';
$str .= "<div class='layui-input-block' id='le'>";
foreach ($data as $key => $value) {
    $str .= '
     <input type="checkbox" name="role" title=" '.$value['title'].'"  value="'.$value['id'].'" '.(in_array($value['key'],$value['auth'])?'checked':'').' >
                ';
}
$str .= " </div>";
        html    +='                    <div class="layui-form-item"  style="margin:5px 0">\n' +
            '                        <label class="layui-form-label" style="width:70px;padding:9px 5px">分类:</label>\n' +
            '                        <input id="sex" type="text" value="" name="cate" list="sexlist" class="layui-input" autocomplete="off" style="width:165px;margin-left: 85px;" >\n' +
            '                        <datalist id="sexlist">\n' +
            '                            {foreach $cate as $key=>$vo }\n' +
            '                            <option>{$vo}</option>\n' +
            '                            {/foreach}\n' +
            '                        </datalist>\n' +
            '                    </div> '

标签: none

添加新评论