check if number is positive php code example
Example: check number is positive or negative in php
if($number > 0){
echo "the number is positive";
}
elseif($number < 0){
echo "the number is negative";
}
else{
echo "the number is zero";
}
if($number > 0){
echo "the number is positive";
}
elseif($number < 0){
echo "the number is negative";
}
else{
echo "the number is zero";
}