The `foreach` can be replaced with a simple `$revised_array = array_diff($this->themes, array($name))`