Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php add array to array

$a = array('a','b','c');
$b = array('c','d','e');

array_push($a, ...$b);
print_r($a);
/*
notice this is different than array merge as it does not merge
values that the same 
Array
(
    [0] => a
    [1] => b
    [2] => c
    [3] => c
    [4] => d
    [5] => e
)
*/
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #add #array #array
ADD COMMENT
Topic
Name
2+1 =