i have a array placed in the variable `$class` that is constituted of sub arrays containing 2 student id's each,
i am trying to find all the sub arrays that contain a certain `id` for example `11` 
i want to keep all arrays containing this id in a variable.

**array example**

```
Array
(
    [0] => Array
        (
            [s1] => 6
            [s2] => 37
        )

    [1] => Array
        (
            [s1] => 8
            [s2] => 11
        )

    [2] => Array
        (
            [s1] => 11
            [s2] => 48
        )

)

```

**code**

```
foreach ($class as $key => $value) {
    if(!in_array($id, $class)){
        unset($class[$key]);
    }
}

```