> From: "B.C. Lance" <[EMAIL PROTECTED]>
> Sent: Sunday, August 11, 2002 10:17 AM
> Subject: Re: [PHP] Re: need help
> <snip>
> Matt wrote:
> > if(0 == $row['gid'])
> </snip>

> ahhh. let the parser do the check. works great if you are not comparing
> with 2 variables :)
> in fact, another way to avoid this kinda pitfall, switch is another
> alternative. but of course, switch has its pitfall too. <break> ;)

Yeah, it doesn't always work, but it adds to the reliablity of the code.  In
my code, it's more often used then not.  It's hard to think that way though,
as it's backwards logic, at least to me.  I always think it first the other
way ($val == constant), and type it backwards :)

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to