Page 1 of 1

Determine Negative

Posted: Wed Feb 15, 2006 5:48 pm
by icesolid
Is there a PHP function to determine if a number is negative?

For example:

Code: Select all

if(function($variable, "-") == true) {

do this

} else {


}

Posted: Wed Feb 15, 2006 5:50 pm
by feyd

Code: Select all

if($variable < 0)
;)