php 一维数组变多维

将下面的数组处理成下图的样子php $arr = ['a', 'b', 'c', 'd','e','f']; <?php $arr = ['a', 'b', 'c', 'd','e','f']; $x = []; $y = &$x; $value = 1234; while ($key = current($arr)) { $y[$key] = []; $y = &$y[$key]; next($
相关文章
相关标签/搜索