30秒到达战场
您可以使用标准PHP库(SPL)来“隐藏”递归。$a = array(1,2,array(3,4, array(5,6,7), 8), 9);$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($a));foreach($it as $v) {
echo $v, " ";}版画1 2 3 4 5 6 7 8 9