Re: Re: If statement w/ multiple conditions
| From: | ed at home dot homes2see dot com | Date: | Tue, 26 Nov 2002 14:22:07 +0000 |
| Subject: | Re: Re: If statement w/ multiple conditions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126092@lists.php.net to get a copy of this message | ||
That's what I was looking to acheive. Thanks!
Ed
On Tue, 26 Nov 2002, Craig wrote:
> Something like this will work...
>
> <?php
>
> if(empty($_GET['1']) && empty($_GET['2']) &&
> empty($_GET['3']) &&
> empty($_GET['4'])){
>
> echo "All vars are EMPTY";
>
> }else{
>
> echo "Some vars contain Content";
>
> }
>
> ?>
>
>
>
>
>
> <ed@home.homes2see.com> wrote in message
>
> news:Pine.LNX.4.04.10211260745120.8696-100000@home.homes2see.com...
> >
> > I'll be trying to use a routine that checks 4 seperate variables for
> > content and need to know the easiest method to do so. The function works
> > on 2 conditions; either all the variables are empty and I do something or
> > I do something else.
> >
> > $lineone
> > $linetwo
> > $linethree
> > $linefour
> >
> > Would you use
> >
> > if ($lineone && $linetwo && $linethree && $linefour =
> > "")
> >
> > Thanks,
> >
> > Ed
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>