Re: Negative numbers

From: Date: Tue, 02 Jan 2001 21:15:14 +0000
Subject: Re: Negative numbers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32324@lists.php.net to get a copy of this message
You are doing something very wrong somewhere. $addon will be 1200 after this bit of code. -Rasmus On Tue, 2 Jan 2001, John LYC wrote: > > HOw do i represent and do calculation on negative values? > due to current situation i need to do this... > > > $duration = 3000; //in sec > $Break = -1800; //in sec > $addon = $duration+$Break; > > result should be 1200 > but php now returns 4800 > even when i try quoting the negative values of Break. > > john > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32324) next »