9951 explained code solutions for 126 technologies


phpHow to append array to another array


$arr1 = [1,2];
$arr2 = [3,4];
$res = array_merge($arr1, $arr2);ctrl + c
$arr1, $arr2

arrays to append to each other

array_merge

will append given arrays to each other

$res

will store resulting array