数组转换有关问题
程序员文章站
2022-06-13 23:47:24
...
数组转换问题
array (0 => array ( 59 => '1', 17 => '1', 23 => '2', 35 => '3', 36 => '1', 40 => '4',43 => '1,3,7', 44 => '1,2,6,9', 70 => '15345178810', ), )
上面的数组如何转换成下面的
array (0 => array ( 59 => '1', 17 => '1', 23 => '2', 35 => '3', 36 => '1', 40 => '4', 43_1 => '1',43_3 => '1',43_7 => '1', 44_1 => '1',44_2 => '1',44_6 => '1',44_9 => '1', 70 => '15345178810', ), )
------解决方案--------------------
那需要再套一层循环
array (0 => array ( 59 => '1', 17 => '1', 23 => '2', 35 => '3', 36 => '1', 40 => '4',43 => '1,3,7', 44 => '1,2,6,9', 70 => '15345178810', ), )
上面的数组如何转换成下面的
array (0 => array ( 59 => '1', 17 => '1', 23 => '2', 35 => '3', 36 => '1', 40 => '4', 43_1 => '1',43_3 => '1',43_7 => '1', 44_1 => '1',44_2 => '1',44_6 => '1',44_9 => '1', 70 => '15345178810', ), )
------解决方案--------------------
那需要再套一层循环
相关文章
相关视频