#35494 [Opn->Bgs]: Array merge problem

From: Date: Wed, 30 Nov 2005 16:27:35 +0000
Subject: #35494 [Opn->Bgs]: Array merge problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-89498@lists.php.net to get a copy of this message
 ID:               35494
 Updated by:       tony2001@php.net
 Reported By:      marek dot rybar at dial dot sk
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Windows, Linux
 PHP Version:      5.1.1
 New Comment:

Expected behaviour.
Use array_merge_recursive() to get the result you expect.


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

[2005-11-30 17:20:41] marek dot rybar at dial dot sk

Description:
------------
When I merge two arrays using + operator, result is array only with the
first array elements.

Reproduce code:
---------------
$arr1 = array(1, 2, 3);
$arr2 = array(5, 6, 7);
$arr = $arr1 + $arr2;

result $arr:
array(1, 2, 3)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35494&edit=1


Thread (3 messages)

« previous php.bugs (#89498) next »