ID: 17303 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Mandrake 8.2 PHP Version: 4.2.0 New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-05-18 05:36:01] [EMAIL PROTECTED] Expected, but probably not well documented behaviour. Only string keys are preserverd. Use $merged_array = $array1 + $array2; for your purpose. Making a documentation problem. ------------------------------------------------------------------------ [2002-05-18 05:18:22] [EMAIL PROTECTED] $array1=(); $array2=(1=>"data"); print_r(array_merge($array1,$array2)); /* this will print out array ( 0 => "data" ) and should be array ( 1=>"data" ) */ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17303&edit=1