title: Get no. of array elements between certain values in PHP?
body: <p>How to the find the number of array elements present in the array between 2 values in PHP     .</p>
  
  <p>lets say this is my array =></p>
  
  <pre><code>$a = array(1,2,3,5,10);
  </code></pre>
  
  <p>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.</p>
  
  <p>also length of array between 2 and 9 is 2.</p>
  
  <p>Hope I am clear with my question. Any help would be appreciated.</p>