Array( [0] => Array ( [0] => [1] => [2] => [3] => [4] => 134578 ) [1] => Array ( [0] => 1 [1] => 9 [2] => 0 [3] => 7 [4] => 8 ) [3].... [4]....)
ayyay([0]=>1,[1]=>9,[2]=>0,[3]=>7,[4]=>8134578,)
$array=array(array(1,2,3,4,5),array(6,7,8,9,10));$newArr=array();foreach($array as $k=>$v){ foreach ($v as $k2=>$v) { if(empty($newArr[$k2])) { $newArr[$k2]=$v; } else if($newArr[$k2]<=$v) { $newArr[$k2]=$v; } }}print_r($newArr);
キー 3 と 4 の値は統合に参加しますか? 説明してください。統合ルールを明確にします。
3 4 を統合する必要があります。1 階の友人が間違っているようです - -
$a = array( array('', '', '', '', 134578), array(1, 9, 0, 7, 8),);$r = call_user_func_array('array_map', array_merge(array(null), array_reverse($a)));$r = array_map('join', $r);print_r($r);
Array( [0] => 1 [1] => 9 [2] => 0 [3] => 7 [4] => 8134578)
$arr = Array( 0 => Array ( 0 => '', 1 => '', 2 => '', 3 => '', 4 => 134578 ), 1 => Array ( 0 => 1, 1 => 9, 2 => 0, 3 => 7, 4 => 8, ));$t = array();foreach(array_reverse($arr) as $val){ foreach($val as $k=>$v){ if(!isset($t[$k])) $t[$k] = $v; else $t[$k] .= $v; } }print_r($t);