Method: a::search
Search for elements in an array by regular expression
Info
Syntax
a::search($array, $search)
Parameters
- $array (array) The source array
- $search (string) The regular expression
Return (array)
The array of results
Example
$array = array(
'cat',
'dog',
'bird',
);
$search = a::search($array, 'cat');
// output: array(
// 'cat'
// )