Re: [PHP] Mystery foreach error
[email protected] (Angela Barone)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
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