Re: Re: If...Or...Else
| From: | Jason Davidson | Date: | Sat, 24 Jul 2004 17:43:15 +0000 |
| Subject: | Re: Re: If...Or...Else | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191755@lists.php.net to get a copy of this message | ||
OR is also bitwise is it not?
Jason
On Sat, 24 Jul 2004 21:23:13 +0400, Stan F <stan@home.ru> wrote:
> Operations OR and || have different execution priorities. I'd prefer "||" as
> it's "more important" so not so many parentheses needed to ensure the order
> of interpretation is exactly what u need.
>
>
>
> ----- Original Message -----
> From: "Tularis" <tularis@php.net>
> To: <php-general@lists.php.net>
> Sent: Saturday, July 24, 2004 6:57 PM
> Subject: [PHP] Re: If...Or...Else
>
> > if(a OR b) {
> > do something
> > } else {
> > do something else
> > }
> >
> > or
> >
> > if(a || b) {
> > do something
> > } else {
> > do something else
> > }
> >
> > is enough :)
> >
> > Robb Kerr wrote:
> > > From time to time I need an If statement that includes an Or
> condition...
> > >
> > > <?php
> > > if ((condition1 == TRUE) OR (condition2 == TRUE)) {
> > > do something;
> > > } esle {
> > > do something else;
> > > }
> > > ?>
> > >
> > > What's the correct syntax for the If line?
> > >
> > > Thanx
> >
> > --
> > 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
>
>