Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

switch case php

switch (fruit) {
  case apple:
    code to be executed if fruit=apple;
    break;
  case banana:
    code to be executed if fruit=banana;
    break;
    ...
  default:
    code to be executed if fruit is different from all fruits;
}
 
PREVIOUS NEXT
Tagged: #switch #case #php
ADD COMMENT
Topic
Name
2+8 =