title: Has anyone ever seen this happen in a php freach loop?
body: <p>I built a multi-dimensional array from a query which has 101 keys</p>
  
  <p>When i echo $result['q101'] before a certain foreach loop it shows the proper data..</p>
  
  <p>after this loop the array is modified somehow to $result['q101'] => 8...???</p>
  
  <p>NOTE: this happens to the last key regardless of the number.</p>
  
  <pre><code>&gt; [q99] =&gt; Array
  &gt;     (
  &gt;         [name] =&gt; Disentanglement from Love Relationship
  &gt;         [abbr] =&gt; DfLR
  &gt;         [type] =&gt; Ascending
  &gt;         [response] =&gt; Sometimes
  &gt;         [score] =&gt; 3
  &gt;     )
  &gt; 
  &gt; [q100] =&gt; Array
  &gt;     (
  &gt;         [name] =&gt; Feelings of Self Worth
  &gt;         [abbr] =&gt; FoSW
  &gt;         [type] =&gt; Ascending
  &gt;         [response] =&gt; Almost Always
  &gt;         [score] =&gt; 1
  &gt;     )
  &gt; 
  &gt; [q101] =&gt; 8 /// WTF is this..??
  </code></pre>
  
  <p>below is the culprit.. if i remove this everything is hunky dory.</p>
  
  <pre><code>foreach ($result as $key =&gt; $val){
      $response_table .= '&lt;tr&gt;&lt;td&gt;'.str_replace('q', '', $key).'&lt;/td&gt;&lt;td&gt;'.$val['response'].'&lt;/td&gt;&lt;td&gt;'.$val['abbr'].'&lt;/td&gt;&lt;td&gt;'.$val['type'].'&lt;/td&gt;&lt;td&gt;'.$val['score'].'&lt;/td&gt;&lt;/tr&gt;';
      $min[$val['abbr']] += 1;
      $max[$val['abbr']] += 1;    
  }
  </code></pre>