array array_filter
(array input [, mixed
callback])
array_filter() returns an array containing all the elements of input filtered according a callback function. If the input is an associative array the keys are preserved.
Example 1. array_filter() example
|
This makes $odd_arr have array ("a"=>1, "c"=>3, "e"=>5);, and $even_arr have array (6, 8, 10, 12);,
See also array_map(), array_reduce().