Using "array_key_exists" to test for key existence in order to solve "Undefined index" notices in certain circumstances.