Listen

$numbers = array(1, 2, 3, 4, 5); $even_numbers = array_filter($numbers, function($n) { return $n % 2 == 0; }); print_r($even_numbers);

Listen

$numbers = array(1, 2, 3, 4, 5); $even_numbers = array_filter($numbers, function($n) { return $n % 2 == 0; }); print_r($even_numbers);