RosettaCodeData/Task/Associative-array-Merging/PHP/associative-array-merging-2...

8 lines
214 B
PHP

<?
$base = array("name" => "Rocket Skates", "price" => 12.75, "color" => "yellow");
$update = array("price" => 15.25, "color" => "red", "year" => 1974);
$result = array_merge($base, $update);
print_r($result);
?>