Re: Friday morning brain farts....
| From: | Tijnema | Date: | Sat, 11 Aug 2007 14:54:54 +0000 |
| Subject: | Re: Friday morning brain farts.... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260689@lists.php.net to get a copy of this message | ||
On 8/11/07, tedd <tedd@sperling.com> wrote:
> At 7:21 PM +0200 8/10/07, Tijnema wrote:
> >On 8/10/07, Robert Cummings <robert@interjinn.com> wrote:
> >
> > > if( !isset( $argv[1] ) || !isset( $argv[2] ) || !isset( $argv[3] ) )
> >
> >if(!isset($argv[1],$argv[2],$argv[3])) // Bit shorter ;)
>
> But a bit harder to recognize IMO. :-)
>
> Cheers,
>
> tedd
> --
But less confusing :)
When I started PHP, I stumbled over this pice of code:
if(!isset($get['a']) && !isset($get['b']) &&
!isset($get['c']))
if I had used this:
if(!isset($get['a'],$get['b'],$get['c']))
it would have been correct :)
After looking at it for about an hour (LOL), I figured out I needed to
change it to:
if(!isset($get['a']) || !isset($get['b']) || !isset($get['c']))
Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info