Might be a mistake
| From: | JuanPi . | Date: | Fri, 05 Aug 2011 15:10:25 +0000 |
| Subject: | Might be a mistake | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-11869@lists.php.net to get a copy of this message | ||
*I think that there is a mistake here:
http://php.net/manual/en/function.array-merge.php*
*[color]=> green doesn't appear*
*
*
[3] => b
[color] => green
[shape] => trapezoid
*
*
*
*
*English*
<?php
$array1 = array("color" => "red", 2, 4);
$array2 = array("a", "b", "color" => "green",
"shape" => "trapezoid", 4);
$result = array_merge($array1, $array2);
print_r($result);
?>
The above example will output:
Array
(
[color] => green
[0] => 2
[1] => 4
[2] => a
[3] => b
[shape] => trapezoid
[4] => 4
)
*http://php.net/manual/es/function.array-merge.php*
*Castellano*
<?php
$array1 = array("color" => "red", 2, 4);
$array2 = array("a", "b", "color" => "green",
"shape" => "trapezoid", 4);
$result = array_merge($array1, $array2);
print_r($result);
?>
El resultado del ejemplo sería:
Array
(
[color] => green
[0] => 2
[1] => 4
[2] => a
[3] => b
[shape] => trapezoid
[4] => 4
)