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. I guess you mean $ a & nbsp ;=& nbsp; array ('A' & nbsp ;=& gt. 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 ......