PHP 检测数组是否存在某个键值 判断数组索引是否存在 array_key_exists();

bool array_key_exists ( mixed key, array search )