Re: The || Operator

From: Date: Sat, 24 May 2003 17:25:33 +0000
Subject: Re: The || Operator
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-148850@lists.php.net to get a copy of this message
*Sigh* I thought there would be a better way... Thanks anyway! "Rasmus Lerdorf" <rasmus@lerdorf.com> wrote in message news:Pine.LNX.4.44.0305241022420.1237-100000@thinkpad.lerdorf.com... > if($you=="few" || $you=="some" || $you=="one") > > On Sat, 24 May 2003, zavaboy wrote: > > $you = "some"; > > if ($you == ("few" || "some" || "one")) { > > echo "yes"; > > }else{ > > echo "no"; > > } > > > > How can I make it print out "yes" if $you is equal to "few", > > "some", or > > "one"? > > > > > > > > >

« previous php.general (#148850) next »