この配列を変換したいのですが、 $array = array('name'=>array('aaaa','bbbb','ccccc'),'uid'=>array('1111','2222' , '3333'));
こんな効果
$k=array(array('name'=>'aaaa','uid'=>'1111'),array('name'=>' bbbb ','uid'=>'2222'),array('name'=>'cccc','uid'=>'3333'));
$key=array_keys($array);foreach($array['name'] as $k=>$v){ $ar[]=array($v,$array['uid'][$k]);}foreach($ar as &$v) $v=array_combine($key,$v);print_r($ar);
$array = array('name'=>array('aaaa','bbbb','ccccc'),'uid'=>array('1111','2222','3333'));foreach($array as $k=>$r){ foreach($r as $i=>$v) $ar[$i][$k] = $v;}print_r($ar);Array