title: PHP Array and Switch Case Statement
body: <p>My Code wont work.
  It just prints out the default</p>
  
  <p>Here is the php</p>
  
  <pre><code>$updatesQuery = "SELECT * FROM updates WHERE Isnote = 0";
          $rs  = mysql_query($updatesQuery) or
          die("SQL: $usersQuery)&lt;br /&gt;".mysql_error());
          while($row = mysql_fetch_array($rs)) {
              switch ($i){
                  case $row[CatID]=1:
                      $i = "kunder";
                      break;
                  case $row[CatID]=2:
                      $i = "bokningar";
                      break;
                  case $row[CatID]=3:
                      $i = "offerter";
                      break;
                  case $row[CatID]=4:
                      $i = "leverantorer";
                      break;
                  case $row[CatID]=5:
                      $i = "kalender";
                      break;
                  default:
                      $i = "no work";
                      break;
              }
              echo $i;                
          }
  </code></pre>
  
  <p>The sql query is valid.
  But my output from this is just the default value. "no work".</p>
  
  <p>What have I written wrong?</p>