PHP数组转置
程序员文章站
2022-03-26 18:54:06
...
PHP数组转置
function rotate($a){
$b=array();
foreach($a as $val){
foreach($val as $k=>$v){
$b[$k][] = $v;
}
}
return $b;
}
AD:真正免费,域名+虚机+企业邮箱=0元