PHP Conditional Statements

PHP Conditional Statements

Conditional Statements

Need to take different actions for different decisions

* In PHP we have the following conditional statements :

1. if statement - executes some code only if a specified condition is true
2. if...else statement - executes some code if a condition is true and another code if the condition is false
3. if...elseif....else statement - selects one of several blocks of code to be executed
4. switch statement - selects one of many blocks of code to be executed







Related Articles

  • PHP2017-07-26PHP සිංහලෙන් - VII PHP Operators (මෙහෙයුම් සංකේත) - Operator එකක් යනු කිසියම් අගයන්  මත රද… Read More
  • PHP2017-07-26PHP සිංහලෙන් - V Basic Syntax (මූලික කාරක රීති) PHP කාරක රීති යනු PHP කොටසක් නිවැරදිව ධාවන කරන්… Read More
  • PHP2017-07-26PHP සිංහලෙන් - X PHP - Decision Making විවිධ කොන්දේසි මත තීරණ ගැනීමට භාවිතා කරන ප්‍රකාශන කිහිපයක… Read More
  • PHP2017-07-26PHP සිංහලෙන් - VIII PHP Constant (PHP නියත ) - PHP Constant යනු එක්තරා විදියක variable එකක් … Read More
  • PHP2017-07-26PHP සිංහලෙන් - VI PHP Variable (PHP විචල්‍යය) Variable යනු කිසියම් දත්තයක් හෝ තොරතුරක් අඩංගු … Read More
  • PHP2017-07-26PHP සිංහලෙන් - II PHP Install කිරීම - PHP සමඟ වැඩ කිරීමට නම් ඒ සමඟ වැඩ කිරීමට මෘදුකාංග කිහිප… Read More