Check positive number or not in php

technical talkiess
0

 <?php

$number = 2;

if($number < 0){

echo "Given number is positive" .$number;

}elseif($number== 0){

echo "Given number is Zero" .$number;

}else{

echo "Given number is Negative" .$number;


}

?> 

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)