how to get filtered values from array like values between range 10-20. my array contain 10,15,18,25,88,20. i want to print only between range 10-20.
use array_intersect
with range
$input = array(10,15,18,25,88,20);
$myrange = range(10,20);
$output = array_intersect($input , $myrange );
print_r($output );
DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With