Кемеровские программисты php общаются здесь
-
Anonymous
Как объединить ряды двух 2D массивов?
Сообщение
Anonymous »
дает мне:
Код: Выделить всё
Array
(
[customer] => One
[itemno] => Yellow Ribbon
)
Array
(
[customer] => One
[itemno] => Blue Band
)
Array
(
[0] => Array
(
[customer] => Two
[itemno] => Red Tape
)
)
< /code>
Но я хочу: < /p>
Array
(
[customer] => One
[itemno] => Yellow Ribbon
)
Array
(
[customer] => One
[itemno] => Blue Band
)
Array
(
[customer] => Two
[itemno] => Red Tape
)
Что я должен использовать?
Подробнее здесь:
https://stackoverflow.com/questions/348 ... -2d-arrays
1740302776
Anonymous
[code]array_push($array, getData())[/code] дает мне:
[code]Array
(
[customer] => One
[itemno] => Yellow Ribbon
)
Array
(
[customer] => One
[itemno] => Blue Band
)
Array
(
[0] => Array
(
[customer] => Two
[itemno] => Red Tape
)
)
< /code>
Но я хочу: < /p>
Array
(
[customer] => One
[itemno] => Yellow Ribbon
)
Array
(
[customer] => One
[itemno] => Blue Band
)
Array
(
[customer] => Two
[itemno] => Red Tape
)
[/code]
Что я должен использовать?
Подробнее здесь: [url]https://stackoverflow.com/questions/3487380/how-to-merge-the-rows-of-two-2d-arrays[/url]