Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array merge without array_merge

$arr1 = array("color1" => "red", "color2" => "blue");
$arr2 = array("color1" => "black", "color3" => "green");
$arr3 = $arr1 + $arr2; //result is array("color1" => "red", "color2" => "blue", "color3" => "green");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #array #merge
ADD COMMENT
Topic
Name
4+8 =