Here, the condition is true then the IF statement will be executed, if the condition is false then the ELSE statement will be executed
Syntax:
if (condition)
{
codes to be executed if condition is true;
}
else
{
codes to be executed if condition is false;
}
Example:
$number_three = 3;
if ( $number_three == 3 )
{
echo "The if statement evaluated to true";
}
else
{
echo "The if statement evaluated to false";
}
0 comments:
Post a Comment