Loading…

How to get specific key value from array in php?

To check key in the array, we can use array_key_exists().

$item=array("name"=>"umesh","class"=>"mca");
if (array_key_exists("name",$item))
{
   echo "Key is exists";
}
else
{
   echo "Key does not exist!";
}

 

 

Suggest An Answer

No suggestions avaliable!

Related Interview Questions