Re: OR statement
| From: | Philip Olson | Date: | Fri, 25 Mar 2005 04:40:02 +0000 |
| Subject: | Re: OR statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211546@lists.php.net to get a copy of this message | ||
> > This work fine, however, I would like to add to the criteria above. I would
> > like to say:
> >
> > if ($audio == "Cool" or "junk" or "funky"){
> >
> > ...
> >
>
> if (in_array($audio,array("Cool","junk","funky"))) {
> ...
> }
>
Yes that's one way but to answer the question:
if ($a == 'foo' OR $a == 'bar') {
Regards,
Philip