L
L
leni_m2018-02-14 16:18:44
PHP
leni_m, 2018-02-14 16:18:44

How to merge two arrays?

$arr1 = array([0] => array(['key1'] => "value1", ['key2'] => "value2"), [1] => array(['key1'] => "value3", ['key2'] => "value4"));
$arr2 = array([0] => "value5", [1] => "value6");

How to get an array of the view:
$arr3 = array([0] => array(['key1'] => "value1", ['key2'] => "value2", ['key3'] => "value5"), [1] => array(['key1'] => "value3", ['key2'] => "value4", ['key3'] => "value6"));
?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Stepanov, 2018-02-16
@Exebeche

You can try to use the special array_merge() function for this.
Only this is a secret function, incl. nobody.. shh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question