Skip to Content

contains()

Check to see if an array contains a string.

PHP June 22, 2017

Usage

PHP
nebula()->contains($needle, $haystack)

Parameters

$needle
(Required) (String) The string to look for
Default: None

$haystack
(Required) (Array) The array to look in
Default: None

Request or provide clarification »

Additional Notes

This function is just an alias of in_array_r($needle, $haystack, 'contains');

Source File

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

No Hooks

This function does not have any filters or actions available. Request one?
PHP
        public function contains($haystack, $needles){return $this->in_array_r($haystack, $needles, 'contains');}

Override

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