|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-31 17:28 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 23:00:01 2025 UTC |
Description: ------------ Para 3 of the text reads: "If only one [associative] array is given ... duplicate entries will be merged into the last one. See example three for details." And example 3 shows: $array_two = array("jay" => "bob", "randal" => "dante", "jay" => "jason"); $result_two = array_merge($array_two); print_r($result_two); Since when has an associative array been able to contain duplicated keys ("jay", in this case)? The array_merge() in the given example is a complete no-op, as a print_r($array_two) shows. Since "duplicate entries" never occur in associative arrays, there doesn't seem to be much point discussing what happens when array_merge() encounters them.