By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,721 Members | 1,468 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,721 IT Pros & Developers. It's quick & easy.

boolean operation

P: n/a
hi all,

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")

kind regards
Stijn
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
i would say,
if ($_periode != NULL && $_periode != "")

Stijn Goris wrote:
hi all,

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")

kind regards
Stijn


Jul 17 '05 #2

P: n/a
On Wed, 22 Oct 2003 13:37:14 GMT, "Stijn Goris" <me*****@hotmail.com>
wrote:
hi all,

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")

kind regards
Stijn


if ($_periode != NULL && $_periode != "")

Steve
Jul 17 '05 #3

P: n/a
Hi,

Stijn Goris wrote:

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")


As other people have pointed out, you need to use && instead of ||

If you're confused as to why, check out "demorgan's rule":
http://lc.brooklyn.cuny.edu/LeftBarF...ic/demorg.html

Regards,

Luke

Jul 17 '05 #4

P: n/a

On 22-Oct-2003, "Stijn Goris" <me*****@hotmail.com> wrote:
what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")


as others have pointed out it should be
if ($_periode != NULL && $_period != "")

however you could also use

if (!($_periode == NULL || $_periode == ""))

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.