<?php
function array_multi2single($array)
{
static $result_array=array();
foreach($array as $value)
{
if(is_array($value))
{
array_multi2single($value);
}
else
$result_array[]=$value;
}
return $result_array;
}
//函数测试部分
$array=array("1"=>array("A","B","C",array("D","E")),"2"=>array("F","G","H","I"));
$array=array_multi2single($array);
echo "<h1>测试结果:</h1>";
foreach($array as $value)
{
echo "<h5>$value</h5>";
echo "<br>";
}
?>
欢迎大家批评指正!
作者Email:fancao0515@0451.com
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】