Source Code:
(back to article)
<?php // Define a variable $var = true; // Check if the variable is equal to true using the strict equality operator (===) if ($var === true) { // If the condition is met, the code inside the if statement will be executed echo "The variable is equal to true"; } else { // If the condition is not met, the code inside the else statement will be executed echo "The variable is not equal to true"; } ?>
Result:
Report an issue