title: Switch vs if statements
body: <p>I'm in a dilemma. Which is best to use and why.. switch or if?</p>
  
  <pre><code>switch ($x) 
  {
  case 1:
    //mysql query 
    //echo something
    break;
  case 2:
    //mysql query 
    //echo something
    break;
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>if ($x == 1) {
      //mysql query 
      //echo something    
  } 
  
  if ($x == 2) {   
      //mysql query 
      //echo something
  }  
  </code></pre>