Question : php elseif
Answered by : alberto-peripolli
<?php
if ($a > $b) {
echo "a is bigger than b";
} elseif ($a == $b) {
echo "a is equal to b";
} else {
echo "a is smaller than b";
}
?>
Source : | Last Update : Thu, 30 Apr 20
Question : php if else
Answered by : alberto-peripolli
<?php
if ($a > $b) {
echo "a is bigger than b";
} elseif ($a == $b) {
echo "a is equal to b";
} else {
echo "a is smaller than b";
}
?>
Source : https://www.php.net/manual/en/control-structures.elseif.php | Last Update : Thu, 30 Apr 20
Question : php if elseif endif
Answered by : nguyen-quang-huy
if ($a > $b): echo "a greater than b";
elseif ($a == $b): echo "a equals b";
else: echo "a is neither greater than or equal to b";
endif;
Source : | Last Update : Fri, 24 Dec 21
Question : if else in php
Answered by : tulasinath-reddy
$result = ($number == 1) ? 'active' : 'disable'
Source : | Last Update : Tue, 28 Jun 22
Question : php if else
Answered by : paulius-ignatavicius
echo 'Your score is: '.($score > 10 ? ($age > 10 ? 'Average' : 'Exceptional') : ($age > 10 ? 'Horrible' : 'Average') );
Source : https://davidwalsh.name/php-ternary-examples | Last Update : Thu, 04 Aug 22
Question : PHP If If Else Else Statement
Answered by : eric-tam
<?php
$a=0;
if($a==0)
{
echo “good”;
}
else if ($a >=1 && $a<=20)
{
echo “great”;
}
else if($a>20)
{
echo “excellent”;
}
else
{
echo “no good”;
}
?>
Source : | Last Update : Sun, 10 Jul 22