- print_r: documentation ( source)
- array_merge: documentation ( source)
- array_replace: documentation ( source)
<?php
$a = array('foo' => 'bar', 'some' => 'string', 'me' => 'is original');
$b = array(42 => 'answer to the life and everything', 1337 => 'leet', 'me' => 'is overridden');
print_r(array(
$a + $b,
array_merge($a, $b),
array_replace($a, $b)
));