public static function inside_array($array, $key, $needle) {
        if (array_has($array, $key)) {
            foreach (array_get($array, $key) as $index => $value) {
                if ($value == $needle) {
                    return $index;
                }
            }
        }
        return false;
    }