Can someone suggest me how can I replace the below code?
How do I rewrite the code in order to avoid the repetition of the block case 3:{code block A; break;}
case 3:{code block A; break;}
This format is shown in the PHP docs:
switch (i) { case 1: case 3: code block A; break; case 2: code block B; break; default: code block default; break; }