title: output of array always equals 'i'
body: <p>I have the variable <code>$request</code>. If i do <code>vardump($request)</code>, I get the output of:</p>
  
  <pre><code>array(7) { 
      ["controller"]=&gt; string(5) "index" 
      ["action"]=&gt; string(5)"index" 
      ["module"]=&gt; string(7) "default" 
      [2]=&gt; array(8) { 
          ["g_goal_list_id"]=&gt; string(3) "127" 
          ["textgoal"]=&gt; string(9) "eats food" 
          ["task_0"]=&gt; string(1) "0" 
          ["value_0"]=&gt; string(5) "pukes" 
          ["task_1"]=&gt; string(1) "0" 
          ["value_1"]=&gt; string(0) "" 
          ["task_2"]=&gt; string(1) "0"
          ["value_2"]=&gt; string(0) "" 
      } 
      [3]=&gt; array(10) { 
          ["g_goal_list_id"]=&gt; string(3) "128" 
          ["textgoal"]=&gt; string(9) "goes home" 
          ["task_0"]=&gt; string(1) "0" 
          ["value_0"]=&gt; string(20) "but never comes back" 
          ["task_1"]=&gt; string(1) "0" 
          ["value_1"]=&gt; string(14) "stays home now" 
          ["task_2"]=&gt; string(1) "0" 
          ["value_2"]=&gt; string(0) "" 
          ["task_3"]=&gt; string(1) "0" 
          ["value_3"]=&gt; string(0) "" 
      } 
      ["submit"]=&gt; string(4) "Save" 
      ["task"]=&gt; string(1) "5" 
  }
  </code></pre>
  
  <p>which is all correct. However, I'm trying to use a foreach statment to grab values from the <code>$request</code> array and put them into a <code>data</code> array, and then submit that to the mysql db...</p>
  
  <pre><code>    foreach($request as $currentrow){
          //skips row if the field is empty
          if(strlen($currentrow['value']) &lt; 1)//need to make sure I've defined $currentrow['value']
              continue;//skips row with empty field
  
          //I only need to grab the value/list_id/account_id from the form    
          $data = array('value' =&gt; $currentrow['value'],
              'g_goal_list_id' =&gt; $currentrow['g_goal_list_id'],
              'account_id' =&gt; g_getAccountId(),
              );
          var_dump($data);                
  </code></pre>
  
  <p>However, when I <code>var_dump($data);</code> my output looks like this:</p>
  
  <pre><code>array(3) { ["value"]=&gt; string(1) "i" ["g_goal_list_id"]=&gt; string(1) "i" ["account_id"]=&gt; string(1) "1" }
  
  array(3) { ["value"]=&gt; string(1) "S" ["g_goal_list_id"]=&gt; string(1) "S" ["account_id"]=&gt; string(1) "1" }
  
  array(3) { ["value"]=&gt; string(1) "5" ["g_goal_list_id"]=&gt; string(1) "5" ["account_id"]=&gt; string(1) "1" }
  </code></pre>
  
  <p>The only thing that is correct in that <code>var_dump($data)</code> is the <code>["account_id"]</code></p>
  
  <p>I'm thinking that my loop is incorrect, and I'm pretty bad with loops. Sooooo yeah, hopefully I included enough information. Thank you.</p>