title: how find sum of an array, for a specific range of keys
body: <pre><code>//input array
  $array = {
            2 =&gt; 5,
            4 =&gt; 1,
            8 =&gt; 3,
            9 =&gt; 2,
  }
  </code></pre>
  
  <p>want sum of key for a specific period like 1-5, 6-10  </p>
  
  <p>need output like array {1-5 => 6 ,6-10 => 5}</p>
  
  <p>without using foreah</p>