Tribe__Utils__Array::remove_numeric_keys_recursive( array $input )
Recursively remove associative, non numeric, keys from an array.
Contents
Parameters
- $input
-
(<span class="arrayarray<string|">int,mixed>) (Required) The input array.
Return
(array<int|mixed>) An array that only contains integer keys at any of its levels.
Source
File: src/Tribe/Utils/Array.php
public static function remove_numeric_keys_recursive( array $input ) {
return self::array_visit_recursive(
$input,
static function ( $key ) {
return is_numeric( $key ) ? false : $key;
}
);
}
Changelog
| Version | Description |
|---|---|
| 4.12.14 | Introduced. |