A good way to survive the new array RT. How to merge two arrays with identical structures into a new array. The array following array_merge will overwrite the previous one. Array structure ------ solution -------------------- I guess you mean $ a & nbsp; array (a & nbsp; & gt; & nbsp; 1) a good way to survive the new array
RT. How to merge two arrays with identical structures into a new array. The array following array_merge will overwrite the previous one.
The array structure is
------ Solution --------------------
I guess you mean this.
$ A = array ('a' => 1 );
$ B = array ('a' => 1 );
Print_r (array_merge_recursive ($ a, $ B ));
Array
(
[A] => Array
(
[0] => 1
[1] => 1
)
)
------ Solution --------------------
Reference:
PHP code? 123456789101112131415 use array_merge_recursive .. Then $ arr = array (); $ count = count ($ data ['id']); for ($ I = 0; $ I <$ count; $ I ++) {$ arr [] = array ('I ......
Sister paper, you are like a wonderful flower shaking in the wind ......