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;
}
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #switch #case #php
ADD COMMENT
Topic
Name
7+8 =