Re: Mystery foreach error
| From: | Angela Barone | Date: | Wed, 13 Mar 2013 23:44:00 +0000 |
| Subject: | Re: Mystery foreach error | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320526@lists.php.net to get a copy of this message | ||
On Mar 13, 2013, at 4:24 PM, Matijn Woudt wrote:
> That wouldn't work, in_array checks the values, and your states are in the keys. Use:
> if(isset($states[$state]))
Hi Matijn,
Before I received your email, I ran across if(array_key_exists) and it seems to work. How does
that differ from if(isset($states[$state]))?
Angela