ID:               17303
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
-Bug Type:         Arrays related
+Bug Type:         Documentation problem
 Operating System: Mandrake 8.2
 PHP Version:      4.2.0
 New Comment:

Expected, but probably not well documented behaviour. Only string keys
are preserverd.

Use $merged_array = $array1 + $array2; for your purpose.

Making a documentation problem.


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to