Source Code:
(back to article)
<?php // Example 1 $myNumber = 5; if ($myNumber == 4) { echo "Number is 4"; } else { echo "Number is not 4" . PHP_EOL; } // Output: Number is not 4 // Example 2 $myString = "hello"; if ($myString == "hi") { echo "Greeting is hi"; } else { echo "Greeting is not hi"; } // Output: Greeting is not hi
Result:
Report an issue