受此启发想到了数组、矩阵转置的方式
来源:3-4 MultipleIterator迭代器
//转置数组矩阵
$a = new ArrayIterator(array(1,2,3));
$b = new ArrayIterator(array('rambo','bob','smith'));
$c = new ArrayIterator(array(21,22,23));
$mit = new MutipleIterator(MutipleIterator::MIT_KEYS_ASSOC);
$mit->attachIterator($a,'id');
$mit->attachIterator($b,'name');
$mit->attachIterator($c,'age');
写回答
关注