case – POFTUT

Tagged: case

0

Linux Bash Case Statement with Examples

Bash provides an interactive shell and programming environment for its users. Programming environment have very reach features like loops for and while, selection if and case. In this tutorial we will examine the case mechanism in detail. Syntax Syntax of case statement is a bit different and complex then if and other conditional expressions. case statement generally uses expression which is value we want to check and patterns which is a case.

EXPRESSION is the value...

0

Php – Switch Case Conditional Statements

[rps-include post=6522] In previous post we have learned how if-elseif-else conditional statement works. Php provides one more conditional statement named switch-case . switch-case statements generally used for more precise and deterministic decisions. We generally check if given value fully matches with given single value in each statement. Syntax of switch-case is like below.

As we can see from syntax we provide VARIABLE and look for each case if LABEL matches with VARIABLE . If matches the...

Enjoy this blog? Please spread the word :)