Question: I have an array as such:

```
$d = [
    0 => [
        0 => 'lorem',
        1 => 'dorem',
        3 => '',
        4 => 'ipsum'
    ],
    1 => [
        0 => 'test',
        1 => 'rere',
        3 => '',
        4 => 'youp'
    ]
];

```

My issue is that I need to remove empty values from the array. How would I go about using `array_filter` in removing such empty keys/values from the multidimensional array? I have over 162 sets of arrays totaling 62 each, so this problem is via a large data set.

Answer: 
Well, I think the answer should cover the iOS14 now.

If you find the delegate method is not be called.

```
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
        ...
}

```

maybe you should consider to use iOS14's one.

```
  @available(iOS 14.0, *)
  func splitViewController(_ svc: UISplitViewController, topColumnForCollapsingToProposedTopColumn proposedTopColumn: UISplitViewController.Column) -> UISplitViewController.Column {
        return .primary
  }

```
```
override func awakeFromNib() {
      super.awakeFromNib()
      splitViewController?.delegate = self
      splitViewController?.preferredDisplayMode = .allVisible
}

//MARK: Split View Controller Delegate
    func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool {
        print("splitview collapse method")
        return false
    }

```

Method is called at launch in Xcode 12.4 on Simulator iPhone, if you set: Storyboard -> Split View Controller -> Style -> Unspecified (Discouraged) not Double Column