search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Programming Dictionary

Online technical manual for service programmers
Popular searches:
Dictionary homepage Server PHP php array_key_exists() function
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 exist

Third 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:

ParametersDescription
keyRequired. Specifies the key name.
arrayRequired. 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:

不存在!
php array_key_exists() function