title: php looping through an array
body: <p>I have an array which contains numbers like "331,554,22" or it could be "45", lets say the array is called <code>$numbers</code>.</p>
  
  <p>I want to loop through the array and for each number or entry in it, do a SQL query like</p>
  
  <pre><code>UPDATE members SET x=1 where id=$numbers[x]
  </code></pre>
  
  <p>Could someone help me along? </p>
  
  <p>UPDATE: Also, say I store the query values in a text field in my database called <code>nums</code> and it looks like eg. "45,656,23", how would I convert that to an array format?</p>