RosettaCodeData/Task/Associative-array-Merging/PHP/associative-array-merging-1.php

8 lines
239 B
PHP
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
<?
$base = array("name" => "Rocket Skates", "price" => 12.75, "color" => "yellow");
$update = array("price" => 15.25, "color" => "red", "year" => 1974);
$result = $update + $base; // Notice that the order is reversed
print_r($result);
?>