You are here: Re: When can I use "OR" « PHP Programming Language « IT news, forums, messages
Re: When can I use "OR"

Posted by Cylindric on 09/15/05 13:38

Smitro wrote:
> Hi,
>
> How come in some statements I can use:
>
> If (something) or DIE();
>
> but other times it won't work (returns an error) unless I take out the
> OR.
>
> Is there any documentation on this anywhere?

Think of it from a conversational point of view:

PHP: "If (something) or DIE();"
ENG: "If MyName=Fred Or Then DoSomething" makes no sense

PHP: "If (something or somethingelse) Then Die();"
ENG: "If MyName=Fred Or MyAge=92 Then DoSomething" makes sense

PHP: "If (something) then DIE();"
ENG: "If MyName=Fred Then DoSomething"

 

Navigation:

[Reply to this 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

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