<?php $arrayone = array ("A", "B", "C", "D"); $arraytwo = array ("C", "D", "E", "F"); $diff = array_diff ($arrayone, $arraytwo); foreach ($diff as $val) { echo "$val", "\n"; } ?>