|
Posted by Richard Davey on 10/12/96 11:33
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
Navigation:
[Reply to this message]
|