Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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";
}
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #check #number #positive #negative #php
ADD COMMENT
Topic
Name
4+8 =