title: problem with switch
body: <p>Here is the sample code.</p>
  
  <pre><code>&lt;?php
  $a =2;
  switch($a) {
      case 1:
      case 2:
      case 3:
          echo "Logic for error validations";
  
      case 1:
          echo "1. code to be executed";
          break;
  
      case 2:
          echo "2. code to be executed";
          break;
  
      case 3:
          echo "3. code to be executed";
          break;
  
      case 4:
          echo "4. code to be executed";
          break;
  
      case 5:
          echo "5. code to be executed";
          break;
  }
  ?&gt;
  </code></pre>
  
  <p>For the value of <code>$a</code> as <code>1,2,3</code> i have same error validations to do.. The update logic differs again for each value of $a.</p>
  
  <p>Inorder to acheive the above said logic, i used case 1: case 2: case 3:and did not use BREAK intentionally. so that it will continue executing. </p>
  
  <p>But it results in o/p, 
  <em>Logic for error validations 1. code to be executed</em>.</p>
  
  <p>Now the output expected is, <em>Logic for error validations 2. code to be executed</em>.</p>
  
  <p>Please help me or suggest changes to produce the expected output. I can use IF and based on the value of $a, change the code. But i am trying to do with the help of switch, which can be expandable for a ranging values of $a.</p>