PHP | preg_grep() Function
The preg_grep() is an inbuilt function in PHP. It returns the array consisting of the elements of the input array that match with the given pattern. Syntax : array preg_grep ( $pattern, $input [, $flags] ) Parameters Used: The preg_grep() function take three parameters that are described below: $pat