title: Use of switch and case in php and codeigniter
body: <p>I want use of <code>switch</code> and <code>case</code> in php and codeigniter library, i try it as following code, But I not receive output. what do i do?</p>
  
  <p><strong>Demo:</strong> <a href="http://codepad.viper-7.com/Wq0Noj" rel="nofollow">http://codepad.viper-7.com/Wq0Noj</a></p>
  
  <pre><code>function indicators() {
      $CI = &amp;get_instance();
      $Year = '1355';
      $Month = '03';
  
      switch ($Year) {
          case 1354:
              $key=array('0.6','0.6','0.6','0.6','0.6','0.6','0.6','0.6','0.6','0.6','0.6','0.6','0.6');
              $output = $key[$Month-1];
              break;
          case 1355:
              $key=array('0.6','0.7','0.2','0.4','0.7','0.1','0.7','0.2','0.5','0.9','0.4','0.8');
              $output = $key[$Month-1];
              break;
          echo $output; // The output should be: 0.7
      }
  }
  </code></pre>