0
can anyone tell me how to use else if and if else
5 Réponses
0
Suppose ....
<?php
$a = 20;
$b = 10;
$c =30;
if(a>b && a>c){
echo "A is greater";
}
else if(a<b && b>c)
{
echo "B is greater";
}
else
{
echo "C is greater";
}
?>
0
resha
0
tnk u
0
the syntax would be
if ( conditon)
{
if the condition is true -execute code;
}
else if (other condition)
{
if the conditon is true. execute;
}
else
// if the condition is false it goes to else code
{
false - execute code;
}
0
r.k.shahijan.917@gmail.cim