All Dictionaries
PHP Related dictionaries
php array_key_exists() function
Detailed instructions for use
php array_key_exists() function
Chinese translation
Recent Updates: 2018-04-18 15:15:13
英[ɪgˈzɪst] 美[ɪɡˈzɪst]
##vi.Existence; survive; live; continue to existThird person singular: exists Present participle: existing Past tense: existed Past participle: existed
php array_key_exists() function syntax
Function: Check whether the specified key name exists in an array
Syntax: array_key_exists(key,array)
Parameters:
| Parameters | Description |
| key | Required. Specifies the key name. |
| array | Required. Specifies an array. |
Description: Returns true if the key name exists, returns false if the key name does not exist.
php array_key_exists() function example
<?php
$a=array("php中文网"=>"西门大官人","php中文网"=>"灭绝师太");
if (array_key_exists("phpStudy",$a))
{
echo "存在!";
}
else
{
echo "不存在!";
}
?>Run instance»
Click the "Run instance" button to view the online instance
Output:
不存在!




