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
  }

```
You need to add this in the function "scene" in the class "SceneDelegate": 

> 
> splitViewController.delegate = self
> 
> 
> 

for example:

```
    class SceneDelegate: UIResponder, UIWindowSceneDelegate {
    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {

    // Setup split controller
    let tabViewController = self.window!.rootViewController as! TabViewController
    let splitViewController = tabViewController.viewControllers![0] as! SplitViewController
    let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
    navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
    navigationController.topViewController!.navigationItem.leftBarButtonItem?.tintColor = UIColor(named: "Theme Colour")

    splitViewController.preferredDisplayMode = .allVisible

    splitViewController.delegate = self//<<<<<<<<add this

    }

```