Skip to Content

in_array_any()

Checks an array for items from another array.

PHP July 13, 2017

Usage

PHP
nebula()->in_array_any($needles, $haystack)

Parameters

$needles
(Required) (Array) An array of elements to look for
Default: None

$haystack
(Required) (Array) An array of elements to search within
Default: None

Request or provide clarification »

Additional Notes

This function will return boolean. True if any of the needles are found, and false if none of them are.

Source File

Located in /libs/Utilities/Utilities.php on line 761.

No Hooks

This function does not have any filters or actions available. Request one?
PHP
        public function in_array_any($needles, $haystack){
            return (bool) array_intersect($needles, $haystack);
        }

Override

This function can not be short-circuited with an override filter. Request one?