Всем привет! Есть 2 массива:
array (size=8)
0 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Ginko' (length=5)
'url' => string '/character/425/Ginko' (length=20)
1 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Isaza' (length=5)
'url' => string '/character/24126/Isaza' (length=22)
2 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Narrator' (length=8)
'url' => string '/character/39597/Narrator' (length=25)
3 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Rokusuke' (length=8)
'url' => string '/character/104353/Rokusuke' (length=26)
4 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Toki' (length=4)
'url' => string '/character/105349/Toki' (length=22)
5 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Mina' (length=4)
'url' => string '/character/105473/Mina' (length=22)
6 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Sakichi' (length=7)
'url' => string '/character/105501/Sakichi' (length=25)
7 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Tatsu' (length=5)
'url' => string '/character/105703/Tatsu' (length=23)
array (size=8)
0 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Main' (length=4)
1 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
2 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
3 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
4 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
5 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
6 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
7 =>
array (size=1)
'characters' =>
array (size=1)
'role' => string 'Supporting' (length=10)
Нужно соединить их так, чтобьі получилось:
array (size=8)
0 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Ginko' (length=5)
'url' => string '/character/425/Ginko' (length=20)
'role' => string 'Main' (length=10)
1 =>
array (size=1)
'characters' =>
array (size=2)
'name' => string 'Isaza' (length=5)
'url' => string '/character/24126/Isaza' (length=22)
'role' => string 'Supporting' (length=10)
..........................................................
Пьітался ф-цией array_merge_recursive но она просто соединяет масивьі добавляя 2-й масив в конец первого.