preg_grep
preg_grep
(PHP 4, PHP 5, PHP 7)
preg_grep — Return array entries that match the pattern
Description
array preg_grep ( string $pattern , array $input [, int $flags = 0 ] )
Returns the array consisting of the elements of the input
array that match the given pattern
.
Parameters
-
pattern
-
The pattern to search for, as a string.
-
input