(PHP4 )
array preg_grep (string pattern, array input)
array preg_grep
preg_grep() returns the array consisting of the elements of the input array that match the given pattern.
Example 1. preg_grep() example
// return all array elements // containing floating point numbers $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array);