Searches for a given value in an array of arrays, objects and scalar values. You can optionally specify
a field of the nested arrays and objects to search in.
public static search ( array $array, mixed $search, boolean $field = false ) : boolean | mixed | ||
$array | array | The array to search |
$search | mixed | The value to search for |
$field | boolean | The field to search in, if not specified all fields will be searched |
Результат | boolean | mixed | False on failure or the array key on success |