就是多个1级分类 下面有不确定个二级分类 二级分类下面有不确定个三级分类 我想获取到相关的数据组合写入数据库 但是这个格式不知道怎么排才能获取到对的数据
有空的亲们给看看 帮下 谢谢
有没有办法获取整列的值 然后根据长度去区分2列 然后再区分三列
现在获取到的数据格式是按行的 1 2 3 。。。
上图
上打印的数据
array (size=16)
0 =>
array (size=7)
0 => float 1
1 => string '销售部' (length=9)
2 => string '销售1区' (length=10)
3 => string '销售1科室' (length=13)
4 => null
5 => null
6 => null
1 =>
array (size=7)
0 => float 2
1 => null
2 => null
3 => string '销售2科室' (length=13)
4 => null
5 => null
6 => null
2 =>
array (size=7)
0 => float 3
1 => null
2 => null
3 => string '销售3科室' (length=13)
4 => null
5 => null
6 => null
3 =>
array (size=7)
0 => float 4
1 => null
2 => null
3 => string '销售4科室' (length=13)
4 => null
5 => null
6 => null
4 =>
array (size=7)
0 => float 5
1 => null
2 => string '销售2区' (length=10)
3 => string '销售1科室' (length=13)
4 => null
5 => null
6 => null
5 =>
array (size=7)
0 => float 6
1 => null
2 => null
3 => string '销售2科室' (length=13)
4 => null
5 => null
6 => null
6 =>
array (size=7)
0 => float 7
1 => null
2 => null
3 => string '销售3科室' (length=13)
4 => null
5 => null
6 => null
7 =>
array (size=7)
0 => float 8
1 => null
2 => null
3 => string '销售4科室' (length=13)
4 => null
5 => null
6 => null
8 =>
array (size=7)
0 => float 9
1 => string '市场部' (length=9)
2 => string '市场1区' (length=10)
3 => string '市场1科室' (length=13)
4 => null
5 => null
6 => null
9 =>
array (size=7)
0 => float 10
1 => null
2 => null
3 => string '市场2科室' (length=13)
4 => null
5 => null
6 => null
10 =>
array (size=7)
0 => float 11
1 => null
2 => null
3 => string '市场3科室' (length=13)
4 => null
5 => null
6 => null
11 =>
array (size=7)
0 => float 12
1 => null
2 => null
3 => string '市场4科室' (length=13)
4 => null
5 => null
6 => null
12 =>
array (size=7)
0 => float 13
1 => null
2 => string '市场2区' (length=10)
3 => string '市场1科室' (length=13)
4 => null
5 => null
6 => null
13 =>
array (size=7)
0 => float 14
1 => null
2 => null
3 => string '市场2科室' (length=13)
4 => null
5 => null
6 => null
14 =>
array (size=7)
0 => float 15
1 => null
2 => null
3 => string '市场3科室' (length=13)
4 => null
5 => null
6 => null
15 =>
array (size=7)
0 => float 16
1 => null
2 => null
3 => string '市场4科室' (length=13)
4 => null
5 => null
6 => null