dozent_array_only( array $array, array|string $keys )
Get a subset of the items from the given array.
Description
Example usage:
dozent_array_only( $array, array( 'remove_key', 'remove_key_2', 'and_so_on' ) );
Parameters
- $array
-
(array) (Required)
- $keys
-
(array|string) (Required)
Return
(array)
Source
File: includes/core-functions.php
function dozent_array_only( $array, $keys ) { return array_intersect_key( $array, array_flip( (array) $keys ) ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |