wp_is_numeric_array
Determines if the variable is a numeric-indexed array.
Description
wp_is_numeric_array( (mixed) $data );
Parameters (1)
- 0. $data (mixed)
- Variable to check.
Usage
if ( !function_exists( 'wp_is_numeric_array' ) ) { require_once ABSPATH . WPINC . '/functions.php'; } // Variable to check. $data = null; // NOTICE! Understand what this does before running. $result = wp_is_numeric_array($data);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/functions.php
- function wp_is_numeric_array( $data ) {
- if ( ! is_array( $data ) ) {
- return false;
- }
- $keys = array_keys( $data );
- $string_keys = array_filter( $keys, 'is_string' );
- return count( $string_keys ) === 0;
- }