Method: a::search

Search for elements in an array by regular expression

Info

Syntax

a::search($array, $search)

Parameters

Return (array)

The array of results

Example


$array = array(
  'cat',
  'dog',
  'bird',
);    

$search = a::search($array, 'cat');
// output: array(
//    'cat'
// )