How can I use the array_filter function to filter an array based on a condition in PHP? Example code: - Biz Tech

How can I use the array_filter function to filter an array based on a condition in PHP? Example code:

Listen
$numbers = array(1, 2, 3, 4, 5);

$even_numbers = array_filter($numbers, function($n) { return $n % 2 == 0; });

print_r($even_numbers);