- print_r: documentation ( source)
- array_merge: documentation ( source)
- array_unique: documentation ( source)
<?php
$a = array('one','two');
$b=array('three','four','five');
//not a union of arrays' values
echo '$a + $b : ';
print_r ($a + $b);
//a union of arrays' values
echo "array_unique(array_merge($a,$b)):";
// cribbed from http://oreilly.com/catalog/progphp/chapter/ch05.html
print_r (array_unique(array_merge($a,$b)));