<?php $first = array('e', 'h', 'r', 'j', 'b'); $last = array('w', 'e', 'c'); $plus_union = $last + $first; echo '<p>'; foreach ($plus_union as $v) { echo "{$v} "; } echo "</p>\n"; $union = array_unique(array_merge($first, $last)); echo '<p>'; foreach ($union as $v) { echo "{$v} "; } echo "</p>\n"; ?>