title: Using just if and elseif in a php syntax
body: <p>This might be a noob question. I just wanna ask if it's correct to use the following codes inside a switch statement: </p>
  
  <pre><code>case 'OPTION1':
    if ($_SESSION['session2'] == 'cart') {  
      $code = '1567';
    }
    else if($_SESSION['session2'] == 'online') {  
      $code= 'A90f';
    } 
  break;
  </code></pre>
  
  <p>Or do I always have to add an else at the end of every if elseif statements? Thank you!</p>