1) { foreach ($title as $word) { if ($word !== $title[count($title) - 1]) echo $word .' '; } } ?> 1) { echo ($title[count($title) - 1]); } ?>