title: My php math is not working
body: <p>I am trying to make a simple division with 2 numbers from my array like this.</p>
  
  <p>here is my array:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [day] =&gt; 2013-04-06
              [hour] =&gt; 06
              [hits] =&gt; 4
              [executetime] =&gt; 10.0000
          )
  
  )
  </code></pre>
  
  <p>I am then dividing them like this: </p>
  
  <p>//### EDIT ###//</p>
  
  <pre><code>$thisHour = date("H", time());
  $thisDate = date("Y-m-d", time());
  
  $total_time = 2.5000;
  
  $moveStats = $memcache-&gt;get('moveStats');
  
  foreach ($moveStats as $k =&gt; $v) {
      $moveStats[$k]['hits']=$moveStats[$k]['hits']+1; // UPDATING THE HITS
  
      $moveStats[$k]['executetime'] += $total_time;
      $moveStats[$k]['executetime'] = number_format($moveStats[$k]['executetime'] / (++$moveStats[$k]['hits']),4,'.','');
  }
  
  $memcache-&gt;set('moveStats', $moveStats);
  </code></pre>
  
  <p>This strangly enough gives me this number: 1.75!</p>
  
  <p>I guess it should be 2.5?</p>
  
  <p>What am I doing wrong. please help and thanks in advance :-)</p>