How to the find the number of array elements present in the array between 2 values in PHP .
lets say this is my array =>
$a = array(1,2,3,5,10);
I want to find the length of array between 2 values i.e. 2 and 10. So the answer will be 3 in the case. If the highest value to be searched is present in the array it should be added in count.
also length of array between 2 and 9 is 2.
Hope I am clear with my question. Any help would be appreciated.