Example:
<?php
$the_number = 4000;
if ( $the_number == 4000 ) {
echo "The if statement evaluated to true";
} else {
echo "The if statement evaluated to false";
}
?>
* We first made a PHP variable called $the_number and set it equal to 4000.
* In this example we compared a variable to an integer value. To do such a comparison we use "==", which in English means "Is Equal To".
* $the_number is indeed Equal To 4000 and so this statement will evaluate to true.
* All code that is contained between the opening curly brace "{" that follows the if statement and the closing curly brace "}" will be executed when the if statement is true.
* The code contained within the else segment will not used.