Is it possible to check the value of a certain key in a PHP array in 1 IF statement? Right now, in order to not throw an index offset error I have to check if the key is set, then check its value.
if (isset($array[$key]))
{
if ($array[$key] == $x)
{
// do stuff
}
}
(sorry, accidentally put ! in first IF originally)