function rotate($a) { $b = array(); foreach ($a as $val) { foreach ($val as $k => $v) { $b[$k][] = $v; } } return $b;}//该片段来自于http://www.codesnippet.cn/detail/021220137664.html
来源: http://www.codesnippet.cn/detail/021220137664.html