Thursday, October 20, 2011

PHP How to Check if a Key Exists in Associative Array

If you have an Array $kvarray of Pairs Key-Value and the Key is stored in the $key Variable you Check if it's present in the Array's Index by the function:
array_key_exists($key, $kvarray)