I have two array and I have to find second array key with first array value compare with each other.

My first array is 

```
    Array
(
    [0] => Array
        (
            [C10359] => Array
                (
                    [0] => 89785
                    [1] => 89786
                    [2] => 89857
                )
            [C10899] => Array
                (
                    [0] => 52924
                    [1] => 52945
                    [2] => 52975
                )
        )
    [1] => Array
        (
            [C10370] => Array
                (
                    [0] => 89785
                    [1] => 89786
                    [2] => 89857
                )
            [C10988] => Array
                (
                    [0] => 52924
                    [1] => 52945
                    [2] => 52975
                )
        )       
)

```

My second array is

```
    Array
(
    [0] => Array
        (
            [C10359] => 89860.5
            [C10899] => 53079
        )
    [1] => Array
        (
            [C10988] => 89860.5
            [C10111] => 53079
        )
)

```

I have to find second array key **C10359** into first array. If match then I want this array first and last value

```
   [C10359] => Array
                (
                    [0] => 89785
                    [1] => 89786
                    [2] => 89857
                )

```

My tried code

```
 $vals = array();
    foreach ($first_array as $k => $v) {
        foreach($v as $key=>$val) {
            if (in_array($val, $second_array)) {
                $value = abs((($val - $second_array)/$second_array)*100);
                    if($value < 25){
                        return $vals ;
                    }
            }
        } 
    }

```