I have an array like this:
[5229561]=> 8
[5229582]=> 9
[5229583]=> 10
[5229584]=> 11
etc
How can I get the minimum value greater than/equal to 10?
So, it this example, it would give me 5229583. I know about the min() function, but I'm not sure how to get a value greater than 10.
You need to evaluate the array for this, a number of methods you can use:
for simplicity (and not trying to be fancy) i’ll show you the easiest way to learn to do this in PHP.
$output will be:
hope that helps
EDIT Addition: (Due to RiaD post below) another simple method to do this.
and even (as of php5.3):