Using the array_filter() Function
<?php
function filter_values($value) {
if($value > 10) return true;
return false;
}
$myints = array(123,45,2345,3,42);
$filtered = array_filter($myints, "filter_values");
print_r($filtered);
?>
Related examples in the same category