> 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.
A good way to learn this sorta thing is with experience. The more you learn and understand, the easier it is to write your own useful code, from scratch. Read the manual section on arrays. Twice. And after awhile your brain will go crazy with ideas :) http://www.php.net/manual/en/language.types.array.php Regards, Philip Olson > 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > 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:[EMAIL PROTECTED] > > > -- > 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