Re: do this OR that

From: Date: Thu, 01 Dec 2005 16:06:36 +0000
Subject: Re: do this OR that
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-226710@lists.php.net to get a copy of this message
Hi Judson, Thursday, December 1, 2005, 12:40:16 PM, you wrote: > I believe I should re-write it like this: > <snippet> > $total = ($mygrade/$quiz->grade) ; > if ($total > .80 | .80) { > </snippet> > Is that right? Thanks in advance for your help. 'OR' is ||, but you need to add the equation as well, i.e.: if ($total > 0.80 || $total == 0.80) However, you can write the above much more easily with: if ($total >= 0.80) Cheers, Rich -- Zend Certified Engineer PHP Development Services http://www.corephp.co.uk

« previous php.general (#226710) next »