Re: Avoiding NOTICEs on Array References

From: Date: Wed, 26 Jan 2005 21:21:15 +0000
Subject: Re: Avoiding NOTICEs on Array References
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-207426@lists.php.net to get a copy of this message
On 26 Jan 2005 Jennifer Goodie wrote: > if (isset($fields['flags']['someflag']) && > $fields['flags']['someflag']) > if (isset($_POST['checkboxfieldname']) && > $_POST['checkboxfieldname']) > > The && short-circuits, so the second part of the conditional only > gets evaluated if the first part is true. I know I can use isset, it just adds a bunch of extra code. I like to find minimal solutions to these things if possible as they are easier to read, and faster to execute. -- Tom

« previous php.general (#207426) next »