clarified the description and fixed some grammatical errors; clarified the code example concerning numeric indexes

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27446 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Beckham 2000-06-30 21:44:08 +00:00
parent 251c6a3eea
commit 018b3e8f5a

View file

@ -190,22 +190,22 @@ array_keys ($array, 100); // returns array (0, 2)
the end of the previous one. It returns the resulting array.
</para>
<para>
If the input arrays had the same string keys, then the later
value for that key will overwrite previous one. If, however, the
arrays have the same numeric key, this does not happen since the
values are appended.
If the input arrays have the same string keys, then the later
value for that key will overwrite the previous one. If, however,
the arrays have the same numeric key, the later value will not
overwrite the original value, but will be appended.
</para>
<para>
<example>
<title><function>array_merge</function> example</title>
<programlisting role="php">
$array1 = array ("color" => "red", 2, 4);
$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid");
$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
array_merge ($array1, $array2);
</programlisting>
<para>
Resulting array will be array("color" => "green", 2, 4, "a",
"b", "shape" => "trapezoid").
"b", "shape" => "trapezoid", 4).
</para>
</example>
<note>