The What
Syntax
switch ( mixed $var ) { case mixed $value1: // do stuff break; case mixed $value2: // do stuff break; default: // do stuff } );
Description
This construct works similar to an if statement, where a value is compared to some condition. The case statements are the individual conditional comparisons, similar to the else if. The default works like an else where if none of the other conditions are true, then it will execute.
Parameters
var- Variable to be evaluated and then compared to each
case. value1- Value to compare the
$varto, which can be a literal, variable, or expression.
Return Values
Returns the number of times the event fired.
When was the last time you got out of your chair and stretched? Just saying…
More coming soon…keep checking back.
