in_array() is used to check whether a value exist or not in an array.

Ex: lets suppose you have an array which is following

$array = array(“ritika”, “shim”, “aaru”, “naval”,”aatish”);

if (in_array(“shim”, $array))
{
echo “exist”;
}
else
{
echo “does not exist”;
}