- print_r: documentation ( source)
- array_merge: documentation ( source)
- compact: documentation ( source)
<?php
$a = ['a', 'b', 'c'];
$b = [ 23 => 'x', 'y', 'z' ];
$c = array_merge($a, $b);
$d = $a + $b;
print_r(compact('a', 'b', 'c', 'd'));
$a = ['a' => 'a', 'b' => 'b', 'c' => 'c'];
$b = [ 23 => 'x', 'y', 'z' ];
$c = array_merge($a, $b);
$d = $a + $b;
print_r(compact('a', 'b', 'c', 'd'));