PHP - Conditional Statements
What will be the output of the following PHP code?
<?php
$temperature = 30;
if ($temperature >= 35) {
echo 'Hot';
} else {
if ($temperature >= 25) {
echo 'Warm';
} else {
echo 'Cold';
}
}
?>What will be the output of the following PHP code?
<?php
$temperature = 30;
if ($temperature >= 35) {
echo 'Hot';
} else {
if ($temperature >= 25) {
echo 'Warm';
} else {
echo 'Cold';
}
}
?>15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions