class Arrays (View source)

Methods

bool
containsString(string $needle, string|array $haystack = array(), bool $recurse = true)

Returns true if any string in the "haystack" contains the "needle".

Details

bool containsString(string $needle, string|array $haystack = array(), bool $recurse = true)

Returns true if any string in the "haystack" contains the "needle".

Parameters

string $needle

The string to search for

string|array $haystack

An array of strings to be searched (Can also contain sub arrays)

bool $recurse

Defaults to true, when enabled this function will check any arrays inside the haystack for a containing value when false it will only check the first level

Return Value

bool