title: PHP Looping through a FOREACH loop
body: <p>I have a FOREACH loop which is not picking up the first element in the array.</p>
  
  <p>I have a submit form which has the following:</p>
  
  <pre><code>&lt;input name="repaired[&lt;?php echo $row_Faults['UniqueID']; ?&gt;]" type="checkbox" id="repaired" value="1" class="required"/&gt;
  </code></pre>
  
  <p>If I echo the $_POST['repair'] array I see two records but when the code is run the first record is not been processed.</p>
  
  <pre><code>foreach($_POST['repaired'] as $uniqueID =&gt; $repairedValue){   
  
  $updateSQL = sprintf("UPDATE ".$Hist." SET Status=%s, LettoStatus=%s WHERE UniqueID= '".$_POST["UniqueID"]."'",
   GetSQLValueString($_POST['Status'] = $StatusCode , "int"),
  GetSQLValueString($_POST['LettoStatus'] = $LettoCode , "int"));
  
  mysql_select_db($database_iMaint, $iMaint);
  $Result1 = mysql_query($updateSQL, $iMaint) or die(mysql_error());
  }
  </code></pre>
  
  <p>Can anyone see where I am going wrong.</p>
  
  <p>Many thanks in advance for your time.</p>