(PHP)Update multiple rows with foreach
===

So i want to update multiple rows with a foreach statement. 
Instead of updating all rows where i am searching for it only updates the first row. How can I update all rows?
Below the script:

    if(isset($_POST['find']))

				{
				$zoekterm = mysql_real_escape_string(addslashes(trim($_POST['zoeken'])));
					if(strlen($zoekterm) < 1) 
						{
						$error = '<p>Je moet wel een zoekterm invoeren.</p>';
						}
					if(isset($error)) 
						{
						echo $error;
						}
					else
					{
					$sql = mysql_query("SELECT * FROM assortiment WHERE art_Nr_Exact LIKE '%$zoekterm%'");
					$aantal = mysql_num_rows($sql);
						echo ($aantal == 1) ? $aantal.' resultaat gevonden' : $aantal.' resultaten gevonden';
						echo '<br><br>';
						echo '<form method="post" action="">';
						echo '<input type="submit" name="wijzigen" value="Wijzig">';
							while($row = mysql_fetch_array($sql))
								{
									echo '<table>';
									echo '<input type="hidden" name="sleutel[]" value="'. $row['A_ID'] .'"';
									echo '<tr>';
									echo '<td style="font-weight:bold;">Artikelnr Leverancier</td>';
									echo '<td style="font-weight:bold;">Leverancier</td>';
									echo '<td style="font-weight:bold;">Omschrijving</td>';
									echo '<td style="font-weight:bold;">Verkoopeenheid</td>';
									echo '<td style="font-weight:bold;">Prijs</td>';
									echo '<td style="font-weight:bold;">Opmerkingen</td>';
									echo '</tr>';
									echo '<tr>';
									echo '<td><input type="text" name="nummerleverancier[]" value="'.htmlentities($row['art_Nr_Leverancier']).'" /></td>';
									echo '<td><input type="text" name="leverancier[]" value="'.htmlentities($row['leverancier']).'" /></td>';
									echo '<td><input type="text" name="omschrijving[]" value="'.htmlentities($row['art_Omschrijving_Exact']).'" size="50" /></td>';
									echo '<td><input type="text" name="verkoopeenheid[]" value="'.htmlentities($row['verkoopeenheid']).'" /></td>';
									echo '<td><input type="text" name="prijs[]" value="'.htmlentities($row['prijs']).'" /></td>';
									echo '<td><input type="text" name="opmerkingen[]" value="'.htmlentities($row['opmerkingen']).'" /></td><br />';
									echo '</tr>';
									echo '</table>';
									echo '</form>';
								}
							}	
						}
							
							
							if(isset($_POST['wijzigen'])){ 
								foreach($_POST['sleutel']  $key => $value){
								$sql = "UPDATE 
								assortiment 
								SET 
								art_Nr_Leverancier='".mysql_real_escape_string($_POST['nummerleverancier'][$key])."', 
								leverancier='".mysql_real_escape_string($_POST['leverancier'][$key])."', 
								art_Omschrijving_Exact='".mysql_real_escape_string($_POST['omschrijving'][$key])."', 
								verkoopeenheid='".mysql_real_escape_string($_POST['verkoopeenheid'][$key])."', 
								prijs='".mysql_real_escape_string($_POST['prijs'][$key])."', 
								opmerkingen='".mysql_real_escape_string($_POST['opmerkingen'][$key])."'
								WHERE A_ID='".mysql_real_escape_string($_POST['sleutel'][$key])."'";
                    
								$result = mysql_query($sql);
									if(!$result) {
									die('Fout ' . mysql_error());
									}
								}
								echo "Succesvol gewijzigd";
							}	
</code>

I already tried UPDATE IN but that doesn't work either. I asked more forums and did searching but nothing was helpful.