title: PHP Multiarray LOOP WHERE CLAUSE
body: <p>Hey guys i would like to repeat this statement 13 times by change this statement within a loop or something. <code>"WHERE spending.SectorID = 1,2,3,4,5,6,7,8,9,10,11,12,13"</code> how can i successfully do it without typing this code 12 more times. and i would to display the data individually though~ like<code>where sectorid = 1;</code> belong to a table with a button to initiate that particular query</p>
  
  <pre><code>&lt;?php
  $spendingname= array();
  $spendingpercent = array();
  $spendingid = array();
  
  mysql_select_db($database_conn2, $conn2);
  $query_Spending = "SELECT CONCAT(spending.SectorID, spending.ExpenditureID) AS 'SpendingID',
  expenditure.ExpenditureName, spending.SpendingPercent, spending.SectorID
  FROM spending   
  INNER JOIN expenditure ON spending.ExpenditureID = expenditure.ExpenditureID
  WHERE spending.SectorID = 1";
  $Spending = mysql_query($query_Spending, $conn2) or die(mysql_error());
  $totalRows_Spending = mysql_num_rows($Spending);
  while($row_Spending = mysql_fetch_assoc($Spending))
  {
  $spendingname[] = $row_Spending['ExpenditureName'];
  $spendingpercent[] = $row_Spending['SpendingPercent'];
  $spendingid[]= $row_Spending['SpendingID'];
  }
  mysql_free_result($Spending);
  ?&gt;
  </code></pre>