Removing duplicate cases in switch

Removing duplicate cases in switch Switch statements in PHP link a situation (the cases) to code to be executed. Duplicate cases in switch statement should be avoided. Just like this : switch ($a) { case ‘a’ : /* code here */ case ‘b’ : /* code here */ default : /* code here */ } Duplicate code in switch statements […]