Skip to Content
Menu

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');

Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!

    Source File

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

    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?