Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Andreas Lindner
Added: Feb 9, 2018 9:32 PM
Modified: Feb 28, 2018 6:17 AM
Views: 16
Tags: no tags
  1. switch ($case) {
  2.     case 'case1':
  3.         $var1 = 'var1';
  4.         break;
  5.     case 'case2':
  6.         $var2 = 'var2';
  7.         break;
  8.     default:
  9.         $var3 = 'var3';
  10. }