二级数据字典怎么做字典二维数据字典数据字典
这是buildadmin自带的数据字典,都是一维数组的形式,我想弄成二维的数据字怎么怎么弄呢?
就像下面这种数据结构,是个二维的:
"certificateType" => [
0 => ['id' => 0, 'name' => '请选择','list' => [0 => '请选择级别']],
1 => ['id' => 1,'name' => '学历证书','list' => [0 => '请选择级别',1 => '小学',2 => '初中',3 => '高中',4 => '中专',5 => '大专',6 => '本科']],
2 => ['id' => 2,'name' => '护士证','list' => [0 => '请选择级别',1 => '护士执照',2 => '初级护士',3 => '初级护师',4 => '中级主管护师']],
3 => ['id' => 3,'name' => '护理员证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级',4 => '技师']],
4 => ['id' => 4,'name' => '会计证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
5 => ['id' => 5,'name' => '医生证','list' => [0 => '请选择级别',1 => '医生执照',2 => '医生资格证']],
6 => ['id' => 6,'name' => '厨师证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
7 => ['id' => 7,'name' => '健康师证','list' => [0 => '请选择级别',1 => '一级',2 => '二级',3 => '三级']],
8 => ['id' => 8,'name' => '营养师证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
9 => ['id' => 9,'name' => '安全员证','list' => [0 => '请选择级别',1 => '食品安全员',2 => '电梯安全员']],
10 => ['id' => 10,'name' => '电工证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
11 => ['id' => 11,'name' => '焊工证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
12 => ['id' => 12,'name' => '消防员证','list' => [0 => '请选择级别',1 => '1级',2 => '2级',3 => '3级',4 => '4级',5 => '5级']],
13 => ['id' => 13,'name' => '社工证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
14 => ['id' => 14,'name' => '档案员证','list' => [0 => '请选择级别',1 => '初级',2 => '中级',3 => '高级']],
15 => ['id' => 15,'name' => '计算机等级证书','list' => [0 => '请选择级别',1 => '一级',2 => '二级',3 => '三级',4 => '四级']],
16 => ['id' => 16,'name' => '外语证','list' => [0 => '请选择级别',1 => '英语',2 => '日语',3 => '韩语']],
17 => ['id' => 17,'name' => '普通话证书','list' => [0 => '请选择级别',1 => '一级',2 => '二级',3 => '三级']],
30 => ['id' => 30,'name' => '其它','list' => [0 => '请选择级别',1 => '请联系管理员']]
]
1个回答默认排序 投票数排序
钝角
尊嘟假嘟O.o?
1年前
结果是这样的,然后自己再调整一下:
请先登录
热门问题
或者改造成这样:
结果是:
你可以自修改为自己需要的格式: