初期配列:
Array
(
[0] => Array (
[0] => "Kate"
[1] => Array ( [0] => 1 [1] => 30 [2] => 11 )
[2] => "Seattle"
)
[1] => Array (
[0] => "Kate"
[1] => Array ( [0] => 100 [1] => 7 [2] => 55 )
[2] => "Seattle"
)
[2] => Array (
[0] => "Mike"
[1] => Array ( [0] => 1 [1] => 2 [2] => 13 )
[2] => "New York"
)
[3] => Array (
[0] => "Paul"
[1] => Array ( [0] => 5 [1] => 34 [2] => 9 )
[2] => "Chicago"
)
[4] => Array (
[0] => "Mike"
[1] => Array ( [0] => 1 [1] => 30 [2] => 13 )
[2] => "New York"
)
)
望ましい出力:
Array
(
[0] => Array (
[0] => "Kate"
[1] => Array ( [0] => 1 [1] => 30 [2] => 11 [3] => 100 [4] => 7 [5] => 55 )
[2] => "Seattle"
)
[1] => Array (
[0] => "Mike"
[1] => Array ( [0] => 1 [1] => 2 [2] => 13 [3] => 30 )
[2] => "New York"
)
[2] => Array (
[0] => "Paul"
[1] => Array ( [0] => 5 [1] => 34 [2] => 9 )
[2] => "Chicago"
)
)
「Kate」、「Mike」、「Paul」のように [0] の文字列値に基づいて配列を単純化したい。その際、[1] の配列をマージして、Desired Output の "Mike" の配列のように一意にしたいと考えています。
何をすべきか、どこから始めればよいかわかりません。助けてください!