English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Explain the working of Conditional Statements in PHP?

Advertisements
Advertisements

Question

Explain the working of Conditional Statements in PHP?

Answer in Brief
Advertisements

Solution

Conditional statements are useful for writing decision-making logics. It is the most important feature of many programming languages, including PHP. They are implemented by the following types:

  1. if Statement:
    If statement executes a statement or a group of statements if a specific condition is satisfied as per the user expectation.
  2. if…else Statement:
    If a statement executes a statement or a group of statements if a specific condition is satisfied by the user expectation. When the condition gets false (fail) the else block is executed.
  3. if…elseif….else Statement:
    If-elseif-else statement is a combination of if-else statements. More than one statement can execute the condition based on user needs.
  4. Switch Case:
    The switch statement is used to perform different actions based on different conditions.
shaalaa.com
Php Conditional Statements
  Is there an error in this question or solution?
Chapter 6: PHP Conditional Statements - Evaluation - PART – IV [Page 111]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 6 PHP Conditional Statements
Evaluation - PART – IV | Q 3. | Page 111
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×