Method: a::contains
Checks if an array contains a certain string
Info
Syntax
a::contains($array, $search)
Parameters
- $array (array) The source array
- $search (string) The string to search for
Return (boolean)
true: the array contains the string, false: it doesn't
Example
$array = array(
'cat',
'dog',
'bird',
);
if(a::contains($array, 'cat')) echo 'miao';