public static function getObjectWithKeyAndValue(array $array, $key, $value)
    {
        foreach ($array as $object) {
            if (is_array($object) && array_key_exists($key, $object) && $object[$key] === $value) {
                return $object;
            }
        }

        return null;
    }
public static function getObjectWithKeyAndValue(array $array, $key, $value)
    {
        foreach ($array as $object) {
            if (is_array($object) && array_key_exists($key, $object) && $object[$key] === $value) {
                return $object;
            }
        }

        return null;
    }
public static function getObjectWithKeyAndValue ( array $ array , $ key , $ value ) { foreach ( $ array as $ object ) { if ( is_array ( $ object ) && array_key_exists ( $ key , $ object ) && $ object [ $ key ] === $ value ) { return $ object ; } } return null ; }
Looks for an array inside input array by key and value and returns one if found

@param array $array
@param $key
@param $value
@return array
Looks for an array inside input array by key and value and returns one if found