代码编辑器:
x
1
2
$a=array("Volvo","BMW");
3
if (array_key_exists(0,$a))
4
{
5
echo "Key exists!";
6
7
} else {
8
9
echo "Key does not exist!";
10
}
11
$a=array("Volvo","BMW");
if (array_key_exists(0,$a))
{
echo "Key exists!";
} else {
echo "Key does not exist!";
}