Re: If statement w/ multiple conditions

From: Date: Tue, 26 Nov 2002 15:57:23 +0000
Subject: Re: If statement w/ multiple conditions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126109@lists.php.net to get a copy of this message
On Tuesday 26 November 2002 23:45, Chris Shiflett wrote: > --- Ernest E Vogelsinger <ernest@vogelsinger.at> wrote: > > At 13:50 26.11.2002, ed@home.homes2see.com said: > > >if ($lineone && $linetwo && $linethree && $linefour = > > >"") > > > > Your expression yields true if 1-3 are not-empty AND four is an > > empty string. > > Actually, this expression yields true when $lineone, $linetwo, and > $linethree are all true. The variable $linefour is just being set to > the empty string. Actually that expression will always be FALSE. $linefour = "" does not evaluate to TRUE thus the whole expression to be FALSE! -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Someone was smoking in the computer room and set off the halon systems. */

« previous php.general (#126109) next »