Re: Control Structure problem
| From: | Luke Skywalker | Date: | Wed, 17 Sep 2003 00:01:23 +0000 |
| Subject: | Re: Control Structure problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162809@lists.php.net to get a copy of this message | ||
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