I have an array with integers of values from 0 to 100. I wish to remove integers that are less than number X and keep the ones that are equal or greater than number X.
A little ugly using the clunky create_function, but straight forward:
create_function
$filtered = array_filter($array, create_function('$x', 'return $x >= $y;'));
For PHP >= 5.3:
$filtered = array_filter($array, function ($x) { return $x >= $y; });
Set $y to whatever you want.
$y