主页
PHP
PHP array_key_exists() 函数
tryphp_func_array_key_exists2
运行 ❯
×
更改方向
保存代码
更改主题
<?php $a=array("Volvo"=>"XC90","BMW"=>"X5"); if (array_key_exists("Toyota",$a)) { echo "Key exists!"; } else { echo "Key does not exist!"; } ?>