Re: Control Structure problem

From: Date: Wed, 17 Sep 2003 00:19:33 +0000
Subject: Re: Control Structure problem
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-162812@lists.php.net to get a copy of this message
I think speaking for everyone its great to be able to help, we all started somwhere :) i remember getting stuck on the same problem in visual basic ages ago Luke ----- Original Message ----- From: "Dan J. Rychlik" <drychlik@tcsconsult.com> To: "Luke Skywalker" <masterskywalker@tpg.com.au>; <php-general@lists.php.net> Sent: Wednesday, September 17, 2003 10:12 AM Subject: Re: [PHP] Control Structure problem > Thank you guys. I truly know the level of expertise on this mailing list, > and I know that it proves invaluable. > > Thank you again. > -Dan > > ----- Original Message ----- > From: "Luke Skywalker" <masterskywalker@tpg.com.au> > To: <php-general@lists.php.net> > Sent: Tuesday, September 16, 2003 7:01 PM > Subject: Re: [PHP] Control Structure problem > > > > try > > > > if ( $var == "TEST ONE" || $var == "TEST TWO" || $var == "TEST > > THREE") { > > > > do something; > > > > } > > > > luke > > ----- Original Message ----- > > From: "Dan J. Rychlik" <drychlik@tcsconsult.com> > > To: <php-general@lists.php.net> > > Sent: Wednesday, September 17, 2003 9:53 AM > > Subject: [PHP] Control Structure problem > > > > > > This doesnt work as expected. > > > > if ( $var === "TEST ONE" || "TEST TWO" || "TEST THREE") { > > > > do something; > > > > } > > > > It returns true on all strings. Ive tried using the or operator and the > == > > but these fail as well. Any Ideas? > > > > -Dan > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#162812) next »