Refactored and added function to reorder array indexes once removed

Moved ghost item to line 34. Added switch to line 14 to hide ghost
value while still echoing new/stored array items. Added reassignment of
$items so that the index values are reordered when an item is removed.