I am trying to apply some if else statements in my code but getting a bit confused. I want a result if I got value=0 answer should be One. if I got value=1 answer should be Two and if I got any value greater then 1 value should be Three. Following is my code: -
$value = 1
if($value < 1)
{
echo "One";
}
else if($value === '1')
{
echo "Two";
}
else if($value >= 2)
{
echo "Three";
}
The problem is that it is not giving me results if value is = 1.