Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $i = 5;
- switch ($i) :
- case 0:
- echo '$i bernilai 0.';
- break;
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- echo '$i bernilai diantara 1 dan 5.';
- break;
- case 6:
- case 7:
- echo '$1 bernilai 6 atau 7.';
- break;
- default:
- echo "Saya tidak tahu nilai dari \$i.";
- endswitch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement