Source Code:
(back to article)
<?php $a = 10; $b = 20; if ($a > 5 && $b < 30) { echo "Both conditions are true\n"; } $a = 5; $b = 20; if ($a > 5 && $b < 30) { echo "Both conditions are true\n"; } else { echo "One of the conditions is false\n"; } $a = 10; $b = 35; if ($a > 5 && $b < 30) { echo "Both conditions are true\n"; } else { echo "One of the conditions is false\n"; } $a = 5; $b = 35; if ($a > 5 && $b < 30) { echo "Both conditions are true\n"; } else { echo "One of the conditions is false\n"; }
Result:
Report an issue