title: Update MySQL table with an Array using Foreach
body: <p>This is driving me potty so please help.</p>
  
  <p>I am trying to update a Mysql table with an array.</p>
  
  <p>Something like this </p>
  
  <pre><code>$a = array('1', '2', '3');
  
  foreach($a as $id){
  
  mysql_query("UPDATE table SET id = '$id' WHERE column = 'something'") or die(mysql_error());
  
  }
  </code></pre>
  
  <p>So after the update the id column should have values 1, 2, 3
  Instead it updates with 1, 1, 1 </p>
  
  <p>Not exactly what I want.</p>
  
  <p>Can someone please showing what I am doing wrong.</p>
  
  <p>Thanks in advance.</p>