### Problem:

I want to remove a parent element of my array with a condition.

### Input

```
$myArray = array (
    0 =>
    array (
      'ulStatic' =>
      array (
        0 =>
        array (
          'day' => '2019-03-30 18:30:00',
          'id' => '7',
          'origin' => 'intentions',
        ),
      ),
      'ulDynamic' =>
      array (
        0 =>
        array (
          'day' => '2019-03-30 18:30:00',
          'id' => '5',
          'origin' => 'intentions',
        ),
      ),
      'ulCreatedDynamic' =>
      array (
      ),
    ),
    1 =>
    array (
      'ulStatic' =>
      array (
        0 =>
        array (
          'day' => '2019-03-31 09:30:00',
          'id' => '8',
          'origin' => 'intentions',
        ),
      ),
      'ulDynamic' =>
      array (
      ),
      'ulCreatedDynamic' =>
      array (
      ),
    ),
    2 =>
    array (
      'ulStatic' =>
      array (
      ),
      'ulDynamic' =>
      array (
      ),
      'ulCreatedDynamic' =>
      array (
        0 =>
        array (
          'day' => '2019-04-02 11:15:00',
          'id' => '275',
          'origin' => 'obseques',
        ),
        1 =>
        array (
          'day' => '2019-04-02 11:15:00',
          'id' => '277',
          'origin' => 'obseques',
        ),
      ),
    ),
  );

```

In this array, I want to remove in associative array named `ulCreatedDynamic` the key that contains `id = 275` and `day = '2019-04-02 11:15:00'`;

So this key have to remove:

```
0 =>
    array (
      'day' => '2019-04-02 11:15:00',
      'id' => '275',
      'origin' => 'obseques',
    ),

```

### Attempt:

```
$id = 275;
$day = "2019-04-02 11:15:00";

foreach($myArray as $array):
    foreach($array as $ul => $v):
        if($ul == "ulCreatedDynamic"):
            foreach($v as $elementKey => $element):
                if($element['day'] == $day && $element['id'] == $id):
                    unset($v[$elementKey]);
                endif;
            endforeach;
        endif;
    endforeach;
endforeach;

```

How do I solve this problem?