Nested IF Structure means when one IF statement is placed in The body of other IF statement then it is called Nested IF Structure. In PHP IF and ELSEIF statement is used for this purpose.
Syntax:
{ statments ; } elseif (different condition) { Statments ; } else { statments } ?>
Lets take an example to understand this structure. Take a number and decided that Numbre is +ve or -ve or zero.
0) { echo "Number is +ve" ; } elseif ($number < 0) { echo " Number is -ve "; } else { echo "Number is Zero"; } ?>
Variables in PHP
PHP Concatenation
Calculation in PHP
If Statements in PHP
if ... else Statements in PHP
Nested IF Structure in PHP
PHP Comparison Operators
Switch Statement in PHP
Logical Operators In PHP
PHP Booleans
FOR Loop in PHP
While Loop In PHP
foreach Loop In PHP
Break Statement
Array In PHP
Associative Array
The Count function
Changing Case Function
Trim Function In PHP
Str_shuffle( ) function
strpos function in PHP
Explode() Function in PHP
Function
Passing Function Arguments
Server Variables
Header Function
Include Function
The require Function