array_filter

Example

 array array_filter ( array $input [, callback $callback ] ) 

Description

Iterates over each value in the input array passing them to the callback function. If the callback function returns true, the current value from input is returned into the result array. Array keys are preserved.

Return Values

Returns the filtered array.