Reply to Re: [PHP] do this OR that

Your name:

Reply:


Posted by Richard Davey on 12/07/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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация