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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.