|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-05-30 19:13 UTC] andrei at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Jun 14 07:00:01 2026 UTC |
If a key from two arrays is the same in an array_merge() function, sub merge those two key's values. array_merge() currently just replaces the other key. Here is an example of the current behavior. $a = array("x" => array(1,2,3)); $b = array("x" => array(4,5,6)); var_dump(array_merge($a, $b)); ---------------------------------- array(1) { ["x"]=> array(3) { [0]=> int(4) [1]=> int(5) [2]=> int(6) } } ------------- I would want it the output to be.. array(1) { ["x"]=> array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) [4]=> int(5) [5]=> int(6) } } Please mail me back with input. nathan@cjhunter.com