Since PHP 4 you can use
array_merge ( array $array1 [, array $array2 [, array $... ]] )
Example:
<?php
$beginning = 'foo';
$end = array(1 => 'bar');
$result = array_merge((array)$beginning, (array)$end);
print_r($result);
?>
The above example will output:
Array
(
[0] => foo
[1] => bar
)
Read more in the php manual: http://php.net/manual/en/function.array-merge.php
For multidimensional arrays (since PHP 4.0.1) you can use:
array_merge_recursive ( array $array1 [, array $... ] )
Example:
<?php
$ar1 = array("color" => array("favorite" => "red"), 5);
$ar2 = array(10, "color" => array("favorite" => "green", "blue"));
$result = array_merge_recursive($ar1, $ar2);
print_r($result);
?>
The above example will output:
Array
(
[color] => Array
(
[favorite] => Array
(
[0] => red
[1] => green
)
[0] => blue
)
[0] => 5
[1] => 10
)