any
Check if array contains at least one of the specified item.
any(iterable $value, $fn = null);
Example:
// Return `true` if `$data` contains `foo`
if (any($data, 'foo')) { … }
// Return `true` if `$data` contains `0` or `1`
if (any($data, function($v, $k) {
return 0 === $v || 1 === $v;
})) { … }
0 Comments
No comments yet.