Re: Mystery foreach error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux