Re[2]: [PHP] if statement
| From: | rdkurth at starband dot net | Date: | Tue, 09 Jul 2002 04:21:16 +0000 |
| Subject: | Re[2]: [PHP] if statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106222@lists.php.net to get a copy of this message | ||
Hello Martin,
Thanks the array worked just perfect. Where do you find stuff like
this I looked all over the manual and could not find anything that
told me how to do this.
Monday, July 08, 2002, 9:01:44 PM, you wrote:
MT> You can do this:
MT> if ($type == "test1" || $type == "test2" || $type == "test3") {
MT> or, what I prefer in this case
MT> if (in_array($type, array("test1", "test2", "test3"))) {
MT> Martin
MT> -----Original Message-----
MT> From: rdkurth@starband.net [mailto:rdkurth@starband.net]
MT> Sent: Tuesday, July 09, 2002 2:11 PM
MT> To: php-general
MT> Subject: [PHP] if statement
MT> Is it possible to do something like this all on one line.
MT> What I need is if any one of these are true then run the script
MT> if($type=="test1")or($type=="test2")or($type=="test3"){
--
Best regards,
rdkurth mailto:rdkurth@starband.net