Re: Re: Avoiding NOTICEs on Array References
| From: | Burhan Khalid | Date: | Thu, 27 Jan 2005 07:58:21 +0000 |
| Subject: | Re: Re: Avoiding NOTICEs on Array References | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207453@lists.php.net to get a copy of this message | ||
Michael Sims wrote:
Jochem Maas wrote:I'm surprised that no one mentioned if (array_key_exists("index",$array)) { /* .. */ }trlists@clayst.com wrote:Here's an approach that I like which I think cuts down on the clumsy constructs.If one must check the value and not just the existence of the checkbox entry, or for other uses, e.g. where a flag may or may not be present, one is saddled with clumsy constructs like: if (($isset($array['index']) && ($array['index'] == 1)) ...okay, I get where your coming from - indeed nasty business them checkboxes.