1.

What is if else statement in PHP?

Answer»

If else statement in PHP:

1. If statement executes a statement or a group of statements if a specific condition is satisfied by the user expectation.

2. When the condition gets false (fail) the else block is executed.

Syntax:

if (condition)

{

Execute statement(s) if condition is true;

}

else

{

Execute statement(s) if condition is false;

}



Discussion

No Comment Found