dog,b=>cat);if (array_key_exists(a,$a)){echo key exists!;}else{echo key does not exist!;}?>
复制代码
输出:key exists!
例2:
dog,b=>cat);if (array_key_exists(c,$a)){echo key exists!;}else{echo key does not exist!;}?>
复制代码
输出:key does not exist!
例3:
复制代码
输出:key exists!